2

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?

Scott
  • 3,663
  • 8
  • 33
  • 56
  • 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 Answers2

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
  • Thank you - the link is very helpful too – Scott May 15 '15 at 14:03
  • 3
    This 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*/
}
  • 1
    Welcome 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