This page describes how to run a monitoring app. This monitoring app acts as a local server and displays the data that a Tuning Fork-enabled app produces. You run the monitoring app alongside your own app to verify that it is properly sending data.
Enable a local endpoint in Unity
You need to configure your app to transmit data to a local endpoint on the
device rather than Google Play servers. To enable a local endpoint, call
EnableLocalEndpoint()
before calling Start()
in your game code:
tuner.EnableLocalEndpoint();
Add a flag in your AndroidManifest.xml
file:
- Open the Unity build settings (File > Build Settings).
- If it’s not selected yet, select the Android platform.
- Select the Export Project checkbox. The next time you build the Unity project, it creates an Android project.
- Build an Android project (File > Build and Run).
- Open the
AndroidManifest.xml
file and add the flagandroid:usesCleartextTraffic="true"
:
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
...
android:usesCleartextTraffic="true"
...
Now your game sends all requests to a local endpoint.
Run your app and the monitor app
Follow these steps to run the Tuning Fork Monitor app and your app at the same time to verify that your app is working properly:
- Download the SDK .zip file. The SDK contains the monitoring app.
- Unzip the file.
- Connect a device (or create a virtual device) to run the apps. Enable developer options and USB debugging on the device.
- Install the Tuning Fork Monitor app APK on the target device using
adb:
adb install gamesdk/gamesdk/apks/tools/TuningForkMonitor.apk
- Press the Android Home button to send the Tuning Fork Monitor app to the background on the device.
- Run your app in the foreground for about 30 seconds.
- Switch back to the Tuning Fork Monitor app.
- Your app's package name appears under Live Applications. Tap this entry to see app details and live telemetry.