I want to have some different behaviors if my app executes on Google-Chrome-ARC.
I currently get the IMEI, which is null on ARC.
public boolean isArc(Context context) {
TelephonyManager tm = ((TelephonyManager)context
.getSystemService(Context.TELEPHONY_SERVICE));
String imei = tm.getDeviceId();
return imei == null;
}
But is it reliable?
Quoting the documentation:
If you need to check if your app is running on Chrome OS, look for
chromium
as theandroid.os.Build.BRAND
andandroid.os.Build.MANUFACTURER
.
I would not rely upon a null
device ID.