Different getUniqueID in different RN versions on Android
See original GitHub issueI have app in React Native 0.58.4 and installed "react-native-device-info": "^0.26.4"
. When i use DeviceInfo.getUniqueID()
in my Android 8 Oreo device i get result 8f80d1805723de81
.
Now i decided to upgrade my project to React Native 0.61.2 and install "react-native-device-info": "^5.0.1"
. So i init new project in new folder, replace App/ folder from old project, install libs, etc. I noticed that getUniqueID()
method now changed to getUniqueId()
. And now when i use DeviceInfo.getUniqueId()
i have different id: c09cfee05a0af6e0
.
I have tried to install "react-native-device-info": "^0.26.4"
to new project, and changed options in app/build.gradle
but none help:
We have 3 options for deviceId:
//Option 1 (latest):
firebaseIidVersion = "19.0.1" // default: "19.0.1"
//Option 2 (legacy GooglePlay dependency but using AndroidX):
googlePlayServicesIidVersion = "17.0.0" // default: "17.0.0" - AndroidX
//Option 3 (legacy GooglePlay dependency before AndroidX):
googlePlayServicesIidVersion = "16.0.1"
How to get my old id in the new version of React Native?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
Different getUniqueID in different RN versions on Android #862
I have app in React Native 0.58.4 and installed "react-native-device-info": "^0.26.4". When i use DeviceInfo.getUniqueID() in my Android 8 ...
Read more >React Native Get Unique ID of Device
How to get the Unique ID of any device using react-native-device-info library. Unique device ID is used to identify a device uniquely.
Read more >DeviceInfo.getUniqueID is not a function - Stack Overflow
since react-native-device-info is upgraded to 4.x.x its method typo is bit changed, it is now accepting DeviceInfo.getUniqueId() instead of ...
Read more >react-native-device-info - npm
This synchronizes uniqueId with IDFV or sets new a random string. On iOS it uses the DeviceUID uid identifier. On other platforms it...
Read more >React Native Libraries for “Native Features” - Bits and Pieces
This library contains the iOS CallKit framework and Android ConnectionService for coordinating the calling services with the system and other ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
TL;DR: after fresh init in RN 0.61.2 folder
android/app
now contain filedebug.keystore
, which is not presented in old RN 058.2. So i replaceddebug.keystore
withrelease.keysore
. And now i get right Android ID.Not worth it, closed.