设备IMEI锁定为平板电脑 [英] Device IMEI locking for tablets

查看:140
本文介绍了设备IMEI锁定为平板电脑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序用于锁定应用程序IMEI code。启动应用程序会检查设备的IMEI的时候,我的意思是,这与允许设备列表进行比较。如果设备在列表中的用户可以继续工作,否则它捞出:

In my application I used to lock application with IMEI code. I mean during startup application checks device IMEI and compares it with list of allowed devices. If device is in list user can continue to work, otherwise it bails out:

public boolean checkIMEI(Activity activity)
{
        TelephonyManager tm=(TelephonyManager )activity.getSystemService(Context.TELEPHONY_SERVICE);
        if(tm==null)
        {
            Log.v(TAG, "Can't get telephony service");
            new MessageBox(activity, "Can't get telephony service. Forcing shut down!");
            return false;
        }
        //encrypted IMEIs list
        String[] vals=activity.getResources().getStringArray(R.array.imeis); 
        //real device IMEI
        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;
        }
        boolean valid=false;
        for(String val:vals)
        {
            String imei=Checker.decryptTemp(val); //decrypt IMEIs
            if(imei.equalsIgnoreCase(deviceId))
            {
                valid=true;
                break;
            }
        }
        if(!valid)
        {
            Log.v(TAG, "Invalid device IMEI!");
            return false;
        }
    return true;
}

与Android平板电脑没有配备电话服务的问题。所以这些设备没有IMEI。在这ID我应该依靠? MAC地址或其他什么东西?还有,每个我要问准了用户的时间给我自己的设备ID ...他们怎么做呢?

Problem with Android tablets not equipped with telephony service. So these devices don't have IMEI. On which id should I rely upon? Mac address or something else? Also each time I need to ask prospective users send me their device id... How they can do it?

推荐答案

IMEI检查可能是个好主意,如果提供专为手机,使用手机的功能,但它是依赖于国家法规。有一些情况EIR(设备识别寄存器)的注册表是他们的移动网络中实现的少数几个国家。它检查被盗和伪造IMEI的这是灰色和黑色标记。黑色标记IMEI的不能使用电话功能,灰色标记被怀疑和对法律的需要跟踪。如果是这样的话使用IMEI检查的情况下才会有价值。

IMEI check could be good idea if offered exclusively for phones, using phone functionality but it is depended on country regulations. There are few countries where EIR (equipment identity register) registry is implemented within their mobile networks. It checks for stolen and fake IMEI's which are grey and black marked. Black marked imei's can't use phone functionality, grey marked are suspected and traced upon legal need. If this is the case then using imei check will be valuable.

这篇关于设备IMEI锁定为平板电脑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆