有一个唯一的ID给到Android handests是可以通过SDK?
Is there a unique ID that is given to Android handests that is available through the SDK?
我想提供一个Web服务与只能使用一次每个资源每个用户进行的操作。也许有一种不同的方式来进行此事。任何想法?
I want to provide a web-service with actions that can only be performed once per resource per user. Maybe there is a different way to go about this. Any ideas?
使用的手机IMEI如下所述:的 http://www.androidsoftwaredeveloper.com/2009/04/02/how-to-get-the-phone-imei/
Use the phone Imei as described here: http://www.androidsoftwaredeveloper.com/2009/04/02/how-to-get-the-phone-imei/
String imei = TelephonyManager.getDefault().getDeviceId();
if (TextUtils.isEmpty(imei)) {
return "";
}
您需要读取手机状态的权限来访问这些数据。所以,你必须添加
You need the read phone state permission to access this data. So you have to add
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
你的清单文件。
to your manifest file.