question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Different getUniqueID in different RN versions on Android

See original GitHub issue

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 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:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
DenisDovcommented, Oct 28, 2019

TL;DR: after fresh init in RN 0.61.2 folder android/app now contain file debug.keystore, which is not presented in old RN 058.2. So i replaced debug.keystore with release.keysore. And now i get right Android ID.

0reactions
DenisDovcommented, Oct 29, 2019

Not worth it, closed.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found