[FREE] UUID - generate /retrieve a unique id of your device

v1 is HERE

V2 is updated for target api 30, so i post v2 here this community.

why this extension

Since we are not able to get DeviceId, get Imei, get Meid, get SimSerialNumber, get SubscriberId and get Serial from Android 10 and higher devices,
the most practical way is to generate a random string and save it on internal storage, and retrieve the string back from the file when needed.

This is what this extension is doing.

blocks

Snipaste_2021-08-18_16-16-52

permission needed

This extension will ask READ_EXTERNAL_STORAGE permission, if denied, it will return empty string.

known issue

1.defautltFileScope need to be set to legacy, other wise no permission granted.

download link:

V2: cn.kevinkun.UUID.aix (12.5 KB)

donate

if you think this extension is useful to you, you may donate to here

Any feedback/ suggestion are welcomed.

4 Likes

It's good if you provide full block

This is all blocks :slight_smile:

1 Like

They are all the blocks. The first generates the uuid and stores it to a designated file. The second returns the uuid to a label. That is it!

1 Like

Wow really nice extension

Is it possible to use app - specific directory instead of external storage? To prevent READ_EXTERNAL_STORAGE request?

data in asd will be erased after uninstall the app.

But. If I will uninstall app and install again - will the uuid replaced with new one when app started first time? Or not? Or it checks presence of file and doesn't generate the new uuid if already exists?

yes, and already explained in first post

It does not. When the user first opens and uses the application, the extension saves a random string to the database (SD card). When the user uninstalles the application, the string is still there. The next time that user installs the application, the extension automatically retrieves that string instead of creating a new one.

2 Likes

Instead of this extension we can use wifi and get the mac address . Mac address always remain the same and unique per device.

why not show us how to do that ?

A post was split to a new topic: How to make a leaderboard in MIT Inventor?

Android does not allow that. Android 6.0 Changes  |  Android Developers

1 Like

i have a question: if user deletes the app and download again uuid will be the same ?

Did you read this topic? Your answer is there.

oh yeah, I'm sorry

Hi, is it possible to use internal storage, because some users not using sd card

It indeed save on the internal storage. I already edited the first post.

1 Like

Is it possible to use this extension with Android 13? If so, I imagine I'm doing something wrong.

I've already changed the manual permissions within the manifest.xml, but I still get an empty return. On Android 9 it works normally.