我的应用如何判断它在 Chrome 设备上是 运行 还是在 Android 设备上?

How can my app tell if it's running in Chrome vs on an Android device?

如果我使用 ARCWelder 将我的应用移植到 Chrome,有没有办法让它知道它是 Chrome 上的 运行?也许通过 BUILD.Version?

引用 the documentation:

If you need to check if your app is running on Chrome OS, look for chromium as the android.os.Build.BRAND and android.os.Build.MANUFACTURER.

//Check for brand and manufacturer
if(Build.BRAND.equals("chromium") && Build.MANUFACTURER.equals("chromium")){
      /*Code to be executed if app is running on chromium*/
}