Skip to main content
Inspiring
May 1, 2017
Question

Adobe AIR - How to get Device ID of Android and iOS?

  • May 1, 2017
  • 2 replies
  • 2315 views

Dear All,

In my project I want to get the user's device ID (Android or iPad whatever he use) whenever he install the app. How can I get it using AS 3.0 in AIR? Please suggest and help me.

Thanks in advance,

Guru

This topic has been closed for replies.

2 replies

RajaguruVAuthor
Inspiring
May 3, 2017

Thank you very much Colin and kglad,

I think I need to explain with more clarity what is the actual requirement. Here it is.

Once the user buy the app and installed in his device, he/she can play in it offline. There is a chance, the user can give his/her login details to many people and they can use it without buy the app. So, if we get his/her device id while install the app, we can monitor whether the same user is accessing the content or any others from different devices when the net is connected and can prevent it. So, I think by store the user's device id will help to do that. Any other better idea or logic? please suggest.

Thanks is advance,

Guru

Colin Holgate
Inspiring
May 3, 2017

I think that reading the user's device ID may not work out, but you could generate a number the first time the user signs in. The app could do that or the server could, but the number would be stored both locally and in the server.

Any other time they try to log in the number would be checked. For that one user it would match, but anyone else who installed the app would get a different number when the app is first used, and so would fail the match.

RajaguruVAuthor
Inspiring
May 4, 2017

Hi Colin,

Have a good day!

Nice solution. I also thought in that way before. But, small difficult is there. If the user uninstalled the app and reinstall the same, the previous generated number also won't be there and the app will generate new number and will check with the server. Obviously that wouldn't match at all. So, the user can't access the content after reinstalled in the same device too. Is there any better way? Please suggest.

Thanks,

Guru

kglad
Community Expert
Community Expert
May 1, 2017

i don't think you can, nor is is necessary.  what reason would you have to access that?

RajaguruVAuthor
Inspiring
May 1, 2017

Hi kglad,

Thanks for your reply.

The reason is, we need to restrict the user to access the app from a particular device. Please let me know if any suggestion.

Thanks,

Guru

kglad
Community Expert
Community Expert
May 1, 2017

i don't understand that.

are you saying each user can install on only one of their devices?  are you saying that only certain udid's are allowed?  something else?