I’m developing an application on android and I need to get a universal identifier of the device.
I can use the IMEI, because the phones have SIM card but tablets no.
Is there any way to uniquely identify tablet devices?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s generally not a good idea to use an ID tied to the device hardware. If a user sells his/her phone to someone else, then the device ID doesn’t change and you risk leaking information to another person. For this and other reasons, the various platforms are deprecating and removing their device ID’s from the developer API. It’s likewise problematic on Android 4.2 tablets with multi-user support.
An easy approach that’s functionally equivalent but doesn’t leak information in this way is to generate a GUID the first time your app is started, store it in your user preferences, and use that GUID every time. This gives you a token that’s unique for that device and app installation, survives backup/restore if you want it to, and still allows the user to wipe the data if he/she so chooses. It has the added advantage that it doesn’t require any exotic application permissions.