Unique Id(Device Id) For Ios And Android Tablet

I would like to have a Unique ID from User’s Devices to identify the User’s Tablet.

How to determine a unique ID from either a iOS and/or Android Tablet from Corona SDK? Is it Possible?Please advise me.Thanks.

You can use system.getInfo(“deviceID”)

Docs can be found here:

http://docs.coronalabs.com/api/library/system/getInfo.html

Thanks ingemar.

 

You can use system.getInfo(“deviceID”)

Docs can be found here:

http://docs.coronalabs.com/api/library/system/getInfo.html

Thanks ingemar.

 

Is this ID unique across all devices in the world?

I thought “device ID” should never be “changed”.

However, after further study, I found the id might get changed? The reason is…

(1) CoronaSDK says it uses “identifierForVendor” for the device ID.

(2) In Apple document, it says about “identifierForVendor”

The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them.

Therefore, when an app (only app from the vendor) is deleted and reinstalled again, the “identifierForVendor” is changed so the value of system.getInfo(“deviceID”) is changed too.

Is there any value that is specific/unique to a device that will never get changed?

Apple does not want apps having access to a unique device identifier.  

Rob

Is this ID unique across all devices in the world?

I’m concerned about this same issue. what i’m planning on doing is rolling my own 64-char unique string.

My main.lua sets up the database. on the first time in, the code will check if there’s a Unique ID issued to the SQLite db; if not, i roll my own and insert into a settingsBehindTheScenes.UniqueID field. 

somehow, using math.randomseed(os.time) and the following code, you should get a reasonably “unique” id issued.

http://www.computercraft.info/forums2/index.php?/topic/12894-how-to-easly-make-random-strings-of-any-length/

and this works agnostically.

I will then store this in a cloud-based mySQL db to track usage of the app.

I thought “device ID” should never be “changed”.

However, after further study, I found the id might get changed? The reason is…

(1) CoronaSDK says it uses “identifierForVendor” for the device ID.

(2) In Apple document, it says about “identifierForVendor”

The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them.

Therefore, when an app (only app from the vendor) is deleted and reinstalled again, the “identifierForVendor” is changed so the value of system.getInfo(“deviceID”) is changed too.

Is there any value that is specific/unique to a device that will never get changed?

Apple does not want apps having access to a unique device identifier.  

Rob

I’m concerned about this same issue. what i’m planning on doing is rolling my own 64-char unique string.

My main.lua sets up the database. on the first time in, the code will check if there’s a Unique ID issued to the SQLite db; if not, i roll my own and insert into a settingsBehindTheScenes.UniqueID field. 

somehow, using math.randomseed(os.time) and the following code, you should get a reasonably “unique” id issued.

http://www.computercraft.info/forums2/index.php?/topic/12894-how-to-easly-make-random-strings-of-any-length/

and this works agnostically.

I will then store this in a cloud-based mySQL db to track usage of the app.