This post could be clearer. It seems that SystemProperties is now available via the public API, i.e. you can only use it if you’re building against the actual source files, which you shouldn’t do unless you are building a custom Android.
(Note that Build.MODEL is not “google_sdk” for Google’s Cupcake emulator (it’s “sdk”), and it’s other things for 3-rd party emulators (like Samsung’s Galaxy Tab and Sony Erikson’s EDK).
android 2.0 is great
LikeLike
i dont see a class called SystemProperties in android, and don’t see that property in System.getProperty()… where do you get this property?
LikeLike
This post could be clearer. It seems that SystemProperties is now available via the public API, i.e. you can only use it if you’re building against the actual source files, which you shouldn’t do unless you are building a custom Android.
You can try to exec “getprop” though:
http://stackoverflow.com/questions/2641111/where-is-android-os-systemproperties
LikeLike
if(android.os.Build.MODEL.equals(“google_sdk”)){
// emulator
}else{
//not emulator
}
LikeLike
boolean inEmulator = “generic”.equals(Build.BRAND);
(Note that Build.MODEL is not “google_sdk” for Google’s Cupcake emulator (it’s “sdk”), and it’s other things for 3-rd party emulators (like Samsung’s Galaxy Tab and Sony Erikson’s EDK).
LikeLike