Test your game on ChromeOS devices

This page describes how to run your game on a ChromeOS device that supports Android for testing purposes. You can use ChromeOS as an alternate testing plarform for Google Play Games on PC if you don't have access to the developer emulator.

If you have access to the developer emulator, we recommend you use it to test your game because it is the closest environment to Google Play Games on PC.

Load and run your game

You can use Android Debug Bridge (adb) to load APK files to your ChromeOS devices. If you haven't already done so, we recommend that you install one of the following tools, which include the latest version of adb:

You also need to enable ADB connection on your ChromeOS devices.

You can run your app directly from Android Studio, or use the adb install command to deploy your APK file to ChromeOS devices. If your game uses an Android App Bundle, use bundletool install-apks to deploy the files.

    adb install C:\yourpath\yourgame.apk

Detect the platform

If you need to toggle gameplay features based on device type, look for the "org.chromium.arc" system feature to detect ChromeOS devices:

Kotlin

var isPC = packageManager.hasSystemFeature("org.chromium.arc")
  

Java

PackageManager pm = getPackageManager();
boolean isPC = pm.hasSystemFeature("org.chromium.arc")
  

C#

var unityPlayerClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
var currentActivity = unityPlayerClass.GetStatic<AndroidJavaObject>("currentActivity");
var packageManager = currentActivity.Call<AndroidJavaObject>("getPackageManager");
var isPC = packageManager.Call<bool>("hasSystemFeature", "org.chromium.arc");