0

I'm making a mobile app with react-native, and I was wondering if I can have some kind of action in the app that is enabled only once for every device without necessity for making an account. Is there any simpler way than sending android device id to the server? I intend to get it like in here:

Is there a unique Android device ID?

I have heard that in ios it is simpler to keep the app data, even after reinstalling the app. Is it possible on android too?

freir96
  • 123
  • 2
  • 13
  • Maybe unrelated but what are you trying to achieve? If it's for validation, it may not be wise to depend on a client-side id. If it's for user's UX, then device resolution makes more sense to me – Luke Vo Oct 07 '19 at 15:03
  • @LukeVo User should get a discount to some tourist attractions by showing a QR code in the app, but the app should be able to make only one code for one place. – freir96 Oct 07 '19 at 17:03

1 Answers1

1

Hi yes this is possible on both android and iOS, We have implement such kind of a mobile app behavior. For that we used the uniqID which is provided by react-native-device-info. We store it in our remote database and using this uniqID we were able to uniquely identify the user and retrieve his data.

Note: In our application we have enable some several security mechanism protect user data form situation like lost phones, Please keep it mind before you implement a such kind of a feature.

EL173
  • 797
  • 9
  • 22
  • That kind of "unique ID" cannot be used to recognize a specific Device because its not reset-persistant. All IDs (I'm talking about Android because I don't know anything about Android) will change after an HardReset, so linking a License/Feature to this kind of UniqueID will occurs in false-negative situations if the user hard-resets its phone due to UniqueID has changed. – emandt Oct 08 '19 at 13:41
  • Yeah it’s true @emandt. In android it will false with hard reset. But in iOS UID will be stored in ios keychain and as i know ios keychain is bind with the iCloud so this will be there unless you override it. – EL173 Oct 11 '19 at 03:56