App to App interface
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 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);
- Replace
testosmartprobeswith the proper URI schema from testo App URIs - 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];
- Replace
testosmartprobeswith 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>
testo Smart specifics
URI parameters
testosmartprobes://start?bundleid=[bundleid]&userinfo=[userinfo]&targetapplication=[application]
| Parameter | Required | Description |
|---|---|---|
bundleid |
yes | Bundle ID of your app, used to build the response URI testoapp+[bundleid]:// |
userinfo |
yes | Any string; returned unchanged in the response, e.g. to match the response to your request |
targetapplication |
no | Opens a measurement application in testo Smart directly, e.g. BasicViewClimateApplication |
Note
Only the scheme testosmartprobes:// starts an App to App session. Both bundleid and userinfo must
be present (userinfo may be empty), otherwise the call only opens testo Smart.
Sending the data back
sequenceDiagram
Your App->>testo Smart: testosmartprobes://start?bundleid=...&userinfo=...
testo Smart->>testo Smart: User performs and saves measurement
testo Smart->>testo Smart: User exports the measurement as JSON
testo Smart-->>Your App: testoapp+[bundleid]://data?userinfo=...&json=...
- testo Smart opens and the user performs the measurement as usual.
- The user exports the measurement in the JSON format (measurement list or measurement summary → Export). While an App to App session is active, the JSON export is not shared via the share sheet but sent to your app. Other formats (PDF, CSV) are exported as usual.
- testo Smart calls the response URI once; the session ends afterwards. If the user never exports, no response is sent (there is no error or cancel response).
Response URI
testoapp+[bundleid]://data?userinfo=[userinfo]&json=[encoded_json]
[encoded_json] is the JSON document, Base64 encoded with a URL-safe alphabet. Before decoding, replace
the characters as follows:
| In the URI | Replace with |
|---|---|
- |
+ |
_ |
/ |
, |
= |
val encoded = uri.getQueryParameter("json") ?: return
val base64 = encoded.replace('-', '+').replace('_', '/').replace(',', '=')
val json = try {
String(android.util.Base64.decode(base64, android.util.Base64.DEFAULT), Charsets.UTF_8)
} catch (e: IllegalArgumentException) {
return // invalid payload
}
let items = URLComponents(url: url, resolvingAgainstBaseURL: false)?.queryItems
guard let encoded = items?.first(where: { $0.name == "json" })?.value else { return }
let base64 = encoded.replacingOccurrences(of: "-", with: "+")
.replacingOccurrences(of: "_", with: "/")
.replacingOccurrences(of: ",", with: "=")
guard let data = Data(base64Encoded: base64),
let json = String(data: data, encoding: .utf8) else { return } // invalid payload
Payload size
The whole measurement is sent inside the URI. Base64 adds about 33 % to the size of the JSON, and there is no chunking or fallback. On Android the URI is passed in an intent, which is limited by the Binder transaction buffer (about 1 MB); larger payloads fail and your app receives nothing. iOS has no documented limit, but very long URLs are not reliable either. App to App is therefore meant for single measurements of moderate size — for long logging measurements use the regular file export. Images are not embedded in the JSON; the payload only references them by file name.
JSON payload
The payload is a measurement in the testo JSON format (TJF), the same format as the JSON export of
testo Smart (.tjf files). The schema is published at
github.com/testo/tjf (slim-schema-v1.4.0.json).
Top-level fields:
| Field | Description |
|---|---|
$schema |
URL of the TJF schema |
type |
Type of the measurement |
timeStamp |
Time of the measurement |
device |
Probes used: name, serial, firmwareVersion, partNumber, … |
channels |
Measurement channels with type, unit and values (timeStamp, value) |
customer, measuringPoint, organisation |
Customer, measuring site and company data, if assigned |
additionalMeasurementInformation |
measurementuuid, appVersion, note, startTime, endTime |
images, properties |
Attached images and further measurement properties |
Example: refrigeration measurement
A JSON export of testo Smart 34.0.2: a refrigeration measurement with a testo 558s digital manifold, a
testo 770-3 clamp meter and three Smart Probes. No customer was assigned, so customer and
measuringPoint are missing and organisation contains empty strings. The App to App response carries
exactly the same document.
Download example-refrigeration.tjf (17,508 bytes, 12 channels with 18 values each, one per second).
| Probe | partNumber |
serial |
Channels (type.name) |
|---|---|---|---|
| testo 558s | 0564 5581 | 86232385 | PressureLow, PressureHigh, EvaporatingTemperature, CondensatingTemperature, TemperatureLow, SuperHeatingTemperature, SubCoolingTemperature |
| testo 770-3 | 0590 3770 | 45300018 | ClampCurrentDC |
| testo 115i | 0560 1115 | 46999293 | TemperatureHigh |
| testo 605i | 0560 2605 | 46971926 | AirTemperature, Humidity |
| testo 510i | 0560 1510 | 47050987 | DifferentialPressure |
Excerpt (two of the twelve channels, values shortened):
{
"$schema": "https://github.com/testo/tjf/raw/public/schema/slim-schema-v1.4.0.json",
"type": { "id": "RefrigerationApplication", "name": "Kälte" },
"timeStamp": "1794917763",
"device": [
{ "name": "testo 770-3", "partNumber": "0590 3770", "serial": "45300018",
"firmwareVersion": "0.8.3", "boardIndex": 0, "additionalData": [],
"measTypes": ["ClampCurrentDC"] },
{ "name": "testo 558s", "partNumber": "0564 5581", "serial": "86232385",
"firmwareVersion": "2.0.40", "boardIndex": 0, "additionalData": [],
"measTypes": ["CondensatingTemperature", "EvaporatingTemperature",
"SubCoolingTemperature", "SuperHeatingTemperature",
"PressureHigh", "PressureLow", "TemperatureLow"] }
],
"channels": [
{
"type": { "name": "ClampCurrentDC", "description": "Stromzange DC" },
"unit": { "name": "A" },
"values": [
{ "timeStamp": "1794917745", "value": 3.46 },
{ "timeStamp": "1794917746", "value": 3.46 }
],
"additionalData": [
{ "name": "measType", "value": "ClampCurrentDC" },
{ "name": "displayUnit", "value": "A" },
{ "name": "serial", "value": "45300018" },
{ "name": "description", "value": "ClampCurrentDC" },
{ "name": "mainChannel", "value": false }
]
},
{
"type": { "name": "SuperHeatingTemperature", "description": "U\u0308berhitzungstemperatur" },
"unit": { "name": "K" },
"values": [
{ "status": "invalid", "timeStamp": "1794917745", "value": 0.0 },
{ "status": "invalid", "timeStamp": "1794917746", "value": 0.0 }
],
"additionalData": [
{ "name": "serial", "value": "86232385" },
{ "name": "mainChannel", "value": true }
]
}
],
"properties": [
{ "name": "CurrentRefrigerant", "values": [ { "value": "1234zeZ" } ] },
{ "name": "PressureType", "values": [ { "value": "Absolute" } ] },
{ "name": "AmbientPressure", "values": [ { "precision": 2, "unit": "hPa", "value": 1013.0 } ] },
{ "name": "LowTemperatureProbeSerialNo", "values": [ { "value": "86232385" } ] },
{ "name": "HighTemperatureProbeSerialNo", "values": [ { "value": "46999293" } ] }
],
"additionalMeasurementInformation": [
{ "name": "measurementuuid", "description": "02613319-a0b5-4ebe-b8ab-8700fa6448f1" },
{ "name": "appVersion", "value": "34.0.2.216998" },
{ "name": "startTime", "value": 1794917745673, "description": "utc timestamp in milliseconds" },
{ "name": "endTime", "value": 1794917762673, "description": "utc timestamp in milliseconds" }
]
}
What the example shows:
- Stable keys vs. display texts. Use
type.idof the measurement andtype.nameof a channel (the same asmeasType) as keys. The measurement'stype.nameand a channel'stype.descriptionare display texts in the language of the app, here German ("Kälte","Stromzange DC"). They can even be Unicode-decomposed ("U\u0308berhitzungstemperatur", U + combining diaeresis), so do not compare them. - Channel to probe.
additionalDataserialof a channel matchesdevice[].serial. One probe can deliver several channels: the testo 558s delivers seven. Which probe the application uses as low and high side is inproperties(LowTemperatureProbeSerialNo,HighTemperatureProbeSerialNo, …). - Main result.
mainChannel: truemarks the channels the application shows as its result, here superheat and subcooling. - Validity. A value without
statusis valid. Withstatus(invalid,overrange,underrangeorempty) ignorevalue: it may benull,0.0or a stale number. In the example the manifold measured ambient pressure (1.01 bar absolute, not connected to a system) and no temperature probe was attached to its low side, soTemperatureLowisnulland superheat (0.0) and subcooling (-15.2) are not valid. - Numbers. Values are rounded to the display precision but written as binary doubles, e.g.
9.6999999999999993for 9.7. Parse them as numbers and format them yourself.unit.nameis the unit the user selected in the app;PressureTypesays whether pressures are absolute or relative. - Times.
timeStamp(document and values) is a string with Unix seconds;startTimeandendTimeare numbers in milliseconds. - Measurement ID. The UUID of the measurement is in the
descriptionofmeasurementuuid, not invalue. - Refrigerant.
CurrentRefrigerantuses the testo refrigerant name (1234zeZ= R1234ze(Z)).