Run the monitor app

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:

  1. Open the Unity build settings (File > Build Settings).
  2. If it’s not selected yet, select the Android platform.
  3. Select the Export Project checkbox. The next time you build the Unity project, it creates an Android project.
  4. Build an Android project (File > Build and Run).
  5. Open the AndroidManifest.xml file and add the flag android: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:

  1. Download the SDK .zip file. The SDK contains the monitoring app.
  2. Unzip the file.
  3. Connect a device (or create a virtual device) to run the apps. Enable developer options and USB debugging on the device.
  4. Install the Tuning Fork Monitor app APK on the target device using adb:
    adb install gamesdk/gamesdk/apks/tools/TuningForkMonitor.apk
    
  5. Press the Android Home button to send the Tuning Fork Monitor app to the background on the device.
  6. Run your app in the foreground for about 30 seconds.
  7. Switch back to the Tuning Fork Monitor app.
  8. Your app's package name appears under Live Applications. Tap this entry to see app details and live telemetry.
Figure 1. The monitor app detects the demo app
Figure 2. The monitor app displays data from the demo app