本帖最后由 hisending2 于 2012-04-29 22:44:25 编辑

解决方案 »

  1.   

    尝试一下设备ID,IMEI code 模拟器为NULL。  TelephonyManager tm=(TelephonyManager )activity.getSystemService(Context.TELEPHONY_SERVICE);
        if(tm==null || !this.hasTelephony())
        {
            Log.v(TAG, "Can't get telephony service. Forcing shut down!");
            return false;
        }
        String deviceId=tm.getDeviceId();
        if(deviceId==null || deviceId.length() < 2)
        {
            Log.v(TAG, "Looks like emulator - bail out!");
            Toast.makeText(activity, "This special version not intended to run in this device!", 5000).show();
            return false;
        }