Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Esta página descreve como executar um app de monitoramento. Esse app funciona como um
servidor local e exibe os dados que um app habilitado para Tuning Fork
gera. Execute o app de monitoramento junto com seu app para verificar se ele está
enviando dados corretamente.
Ativar um endpoint local no Unity
Você precisa configurar seu app de modo que ele transmita dados para um endpoint local no
dispositivo, e não para os servidores do Google Play. Para ativar um endpoint local, chame
EnableLocalEndpoint()
antes de chamar Start() no código do jogo:
tuner.EnableLocalEndpoint();
Adicione uma sinalização ao arquivo AndroidManifest.xml:
Abra as configurações de compilação do Unity (Arquivo > Configurações de compilação).
Selecione a Plataforma Android, caso ainda não esteja selecionada.
Marque a caixa de seleção Exportar projeto. Na próxima vez que você criar um projeto Unity,
ele gerará um projeto Android.
Crie um projeto Android (Arquivo > Criar e executar).
Abra o arquivo AndroidManifest.xml e adicione a sinalização android:usesCleartextTraffic="true":
O conteúdo e os exemplos de código nesta página estão sujeitos às licenças descritas na Licença de conteúdo. Java e OpenJDK são marcas registradas da Oracle e/ou suas afiliadas.
Última atualização 2025-08-26 UTC.
[null,null,["Última atualização 2025-08-26 UTC."],[],[],null,["This page describes how to run a monitoring app. This monitoring app acts as a\nlocal server and displays the data that a Tuning Fork-enabled app\nproduces. You run the monitoring app alongside your own app to verify that it is\nproperly sending data.\n\nEnable a local endpoint in Unity\n\nYou need to configure your app to transmit data to a local endpoint on the\ndevice rather than Google Play servers. To enable a local endpoint, call\n[`EnableLocalEndpoint()`](/games/sdk/reference/performance-tuner/unity/class/google/android/performance-tuner/android-performance-tuner-t-fidelity-t-annotation-#enablelocalendpoint)\nbefore calling `Start()` in your game code: \n\n tuner.EnableLocalEndpoint();\n\nAdd a flag in your `AndroidManifest.xml` file:\n\n1. Open the Unity build settings (**File \\\u003e Build Settings**).\n2. If it's not selected yet, select the Android platform.\n3. Select the **Export Project** checkbox. The next time you build the Unity project, it creates an Android project.\n4. Build an Android project (**File \\\u003e Build and Run**).\n5. Open the `AndroidManifest.xml` file and add the flag `android:usesCleartextTraffic=\"true\"`:\n\n \u003capplication\n android:allowBackup=\"true\"\n android:icon=\"@mipmap/ic_launcher\"\n ...\n android:usesCleartextTraffic=\"true\"\n ...\n\nNow your game sends all requests to a local endpoint.\n\nRun your app and the monitor app\n\nFollow these steps to run the Tuning Fork Monitor app and your app at the same time\nto verify that your app is working properly:\n\n1. Connect a device (or [create a virtual device](/studio/run/managing-avds)) to run the apps. Enable [developer options and USB debugging](/studio/debug/dev-options#enable) on the device.\n2. Install the Tuning Fork Monitor app APK on the target device. You can build it from the [Tuning Fork Monitor source page](https://android.googlesource.com/platform/frameworks/opt/gamesdk/+/refs/heads/gamesdk-main/games-performance-tuner/tools/TuningForkMonitor/).\n3. Press the Android Home button to send the Tuning Fork Monitor app to the background on the device.\n4. Run your app in the foreground for about 30 seconds.\n5. Switch back to the Tuning Fork Monitor app.\n6. Your app's package name appears under **Live Applications**. Tap this entry to see app details and live telemetry.\n\n**Figure 1.** The monitor app detects the demo app \n**Figure 2.** The monitor app displays data from the demo app"]]