Android device unique identifier

which device info property describes unique number of an android device. I want to retrieve an device id which should identify the device as unique.

Hi there,

you can use the ANDROID_ID. You can do that by installing “expo install expo-device” after that simply use that code:

import * as Device from ‘expo-device’;

const myFunc = async () => {
const deviceId = Device.deviceId;
console.log(“Device ID:”, deviceId);

You can read the docs here:

Best regards

hi aaron,

android Id remains constant for lifetime if the android version is lower than 8. but in higher versions it changes from app to app. i want to get unique id of a device it should constant for any app.