TelephonyManager telmgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String deviceID = telmgr.getDeviceId();
boolean isEmulator = "000000000000000".equalsIgnoreCase(deviceID);
if (isEmulator) {
((myApp) getApplication()).setBitmapX(BitmapFactory.decodeFile(imageFileName));
} else {
((myApp) getApplication()).setBitmapX(BitmapFactory.decodeByteArray((byte[]) args[0], 0, ((byte[])args[0]).length));
}
判断真机还是模拟器
最新推荐文章于 2023-05-15 16:20:14 发布