If I use ARCWelder to port my app to Chrome, is there a way for it to know that it's running on Chrome? Maybe through BUILD.Version?
Asked
Active
Viewed 777 times
2
-
Possible duplicate of [How to detect programmatically if "Android App" is running in chrome book or in Android phone](https://stackoverflow.com/questions/39784415/how-to-detect-programmatically-if-android-app-is-running-in-chrome-book-or-in) – fattire Jul 02 '17 at 09:05
2 Answers
3
Quoting 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.

CommonsWare
- 986,068
- 189
- 2,389
- 2,491
-
-
3This was true of the old ARC welder system but no longer works in the current incarnation of ARC. Check out [this question](https://stackoverflow.com/questions/39784415/how-to-detect-programmatically-if-android-app-is-running-in-chrome-book-or-in). – fattire Jul 02 '17 at 09:04
2
//Check for brand and manufacturer
if(Build.BRAND.equals("chromium") && Build.MANUFACTURER.equals("chromium")){
/*Code to be executed if app is running on chromium*/
}

Vandan Phadke
- 71
- 2
-
1Welcome to StackOverflow! Please expand a bit on your answer. It's pretty much self-explanatory in this case, but code-only answers are generally not acceptable :) – MeanGreen Jun 22 '15 at 08:46