How to Uniquely Identify an Android Device and App Installation

Today, In android Programming we are going to check how do we uniquely identify an android device. We sometimes want to identify a device even after uninstall of the app and reinstall so we want to get an id of the device which did not change. Some developers use IMEI number but some devices like tablets does not have telephony service so no IMEI No, also retriving IMEI No requires you to ask for permission, So here i will use the best approach by using a value called ANDROID_ID This id value will be same throughout the life of the android device and will only change if a factory reset of the device is done by the phone service center, so we can use this id to identify a device.This id will be unique for each android device in market
Now there is another scenario in which we want to uniquely identify an installation in case a user do backup and transfer our paid app from an old device to new device so the device id changes but if we keep an installation id then it will be same.I will show you show to do that.This id will change only if you re-install the app.
Share on Google Plus

About Admin

I am a Java and Android developer and a science enthusiast.I Like to explain complex things in simple language so anybody even without a graduation in computer science or Electronics can understand the concepts easily.

0 comments:

Post a Comment