Is there a unique ID that is given to Android handests that is available through the SDK?
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?
Is there a unique ID that is given to Android handests that is available through the SDK?
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?
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.
Use the IMEI for identifying handsets. This is one of the most reliable source.
TelephonyManager.getDefault().getDeviceId();