判断真机还是模拟器
?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));?
? ? ? ? ? ? ? ? }?