This page describes how to run your game on a Chrome OS device that supports Android for testing purposes. You can use Chrome OS as an alternate testing plarform for Google Play Games 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.
Load and run your game
You can use Android Debug Bridge (adb) to load APK files to your Chrome OS 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 Chrome OS devices.
You can run your app directly from Android Studio, or use the
command to deploy your APK file to Chrome OS 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 Chrome OS devices:
var isPC = packageManager.hasSystemFeature("org.chromium.arc")
PackageManager pm = getPackageManager(); boolean isPC = pm.hasSystemFeature("org.chromium.arc")
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");