Get unique device id without ejecting


#1

This library allows you to get unique device id / Mac address of Android devices, which doesn’t change after reinstallation.

Expo.Constants.deviceId changes after every reinstallation (even if the app version number is the same).

Is there a way to get an unique id for Android that doesn’t change after reinstallation (at least for if it’s the same version), without ejecting?


#2

hi-

we don’t have a standard way to do this beyond the Expo.Constants.deviceId that you’ve already examined.

also, looking at that module, it seems like it won’t always work between different installs if you read through the notes.

i’ve seen people attempt things like this using a few different techniques – mainly using browser cookies (which requires a browser redirect and then a bounce back into the app which can be jarring, but should be fairly reliable unless the user clears cookies), and sometimes by triangulating using a bunch of different properties of the device.

i would worry a little bit that any attempt to do this might run afoul of apple or google app store rules but i don’t know the details of those; it’s just something i would look into.

if you come up with a good solution, let me know!