public boolean isAndroidEmulator() {
String model = Build.MODEL;
Log.d("IS Model", "model=" + model);
String product = Build.PRODUCT;
Log.d("IS Product", "product=" + product);
boolean isEmulator = false;
if (product != null) {
isEmulator = product.equals("sdk") || product.contains("_sdk")
|| product.contains("sdk_");
}
Log.d("imulator", "isEmulator=" + isEmulator);
return isEmulator;
}
String model = Build.MODEL;
Log.d("IS Model", "model=" + model);
String product = Build.PRODUCT;
Log.d("IS Product", "product=" + product);
boolean isEmulator = false;
if (product != null) {
isEmulator = product.equals("sdk") || product.contains("_sdk")
|| product.contains("sdk_");
}
Log.d("imulator", "isEmulator=" + isEmulator);
return isEmulator;
}
No comments:
Post a Comment