Skip to content

App to App

The App to App interface is available in most testo Apps.

sequenceDiagram
  Your App->>testo App: Call testo App URI
  testo App->>testo App: Perform measurement
  testo App-->>Your App: Call response URI

testo App URIs

App URI Schema
testo Smart testosmartprobes://
testo 400 testosmartprobes://
testo 300 testot330i://
testo 330i testot330i://
testo Combustion testot330://

Calling testo App URI

[URI Schema]://start?bundleid=[bundleid]&userinfo=0

Examples

Android
Uri.Builder uriBuilder = new Uri.Builder();
uriBuilder.scheme("testosmartprobes"); // (1)
uriBuilder.authority("");
uriBuilder.appendPath("start");
uriBuilder.appendQueryParameter("userinfo", "");
uriBuilder.appendQueryParameter("bundleid", bundleId); // (2)
Intent intent = new Intent(Intent.ACTION_VIEW, uriBuilder.build());
startActivity(intent);
  1. Replace testosmartprobes with the proper URI schema from testo App URIs
  2. Insert the bundleId of your Android app
iOS (Objective C)
NSString *urlString = @"[URI Schema]://start?userinfo=0&bundleid=[bundleid]"; // (1)
NSURL *testoURL = [NSURL URLWithString:urlString];

[[UIApplication sharedApplication] openURL:testoURL];
  1. Replace testosmartprobes with the proper URI schema from testo App URIs and add your bundle ID

Reply to response URI

The testo app will call the following URI, where [bundleid] is replaced with your bundleid provided in the calling URI and [base64_encoded_json_data] is replaced by the JSON payload:

testoapp+[bundleid]://data?json=[base64_encoded_json_data]

Your app needs to register for handling this URL, this can be done in AndroidManifest.xml or in Info.plist for Android or iOS respectively.

Register for response URI on Android

This example assumes the bundle ID of de.testo.androiddatareceiverdemo:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="de.testo.androiddatareceiverdemo" android:versionName="1.1" android:versionCode="1" >
  <application [...]>
    <activity [...]>
      [...]
      <intent-filter>
        <data android:scheme="testoapp+androiddatareceiverdemo" />
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
      </intent-filter>
    </activity>
  </application>
</manifest>

Register for response URI on iOS

This example assumes the bundle ID of de.testo.DataReceiverDemo:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  [...]
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>testoapp+de.testo.DataReceiverDemo</string>
            </array>
            <key>CFBundleURLName</key>
            <string>de.testo.testoCallbackURL</string>
        </dict>
    </array>
</dict>
</plist>