get unique identifier of the mobile device

T

tk dd

Guest
i am writing my own ranking system. i don't want to force users to enter some user name or log into facebook.
Name is not very important, i just need to get some unique identifier so that i can distinguish one's score from others.

I could get device id using https://marketplace.yoyogames.com/assets/977/deviceid-for-ios-and-android
however i don't know if it is ok to store device id in my database. I probably could hash it from my web endpoint but i don't even want to send the device id over the wire.

Is there a way to generate guid in GML? Or a way to hash a value?
 
M

Mishtiff

Guest
Problem with this is when they switch phones, they lose all their data. I would not suggest this. I am not saying you cant, but I would rather you not. I think you could make a simple login that only required once. it could do all the work every start up. Just my 2 cents, if this is not what you want, wait for others to suggest !
 
T

tk dd

Guest
Problem with this is when they switch phones, they lose all their data. I would not suggest this. I am not saying you cant, but I would rather you not. I think you could make a simple login that only required once. it could do all the work every start up. Just my 2 cents, if this is not what you want, wait for others to suggest !
thanks but in my scenario this is as casual as it gets and i want to keep this as simple as possible. not carrying user scores between phones is perfectly fine in my case. Thank you for your reply though :)
 
G

Gabriel Amici

Guest
Hey, I need a similar feature for my online highscore system, I've used the extension and it returns "Undefined" in my android phone. I can solve it by manually turning on "read phone status and identity" permission in android app managing. But I need it to work on any device regardless of the manual android permission. Note: I have already enabled READ_PHONE_STATE inside GMS2

Any clue about what could be wrong?

TIA
Gabriel
 

rIKmAN

Member
But is it a guaranteed unique ID for each device on Earth?
You could always Google UUIDs and do some research?
https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random) said:
For example, the number of random version-4 UUIDs which need to be generated in order to have a 50% probability of at least one collision is 2.71 quintillion, computed as follows:



This number is equivalent to generating 1 billion UUIDs per second for about 85 years, and a file containing this many UUIDs, at 16 bytes per UUID, would be about 45 exabytes, many times larger than the largest databases currently in existence, which are on the order of hundreds of petabytes.

The smallest number of version-4 UUIDs which must be generated for the probability of finding a collision to be p is approximated by the formula


Thus, the probability to find a duplicate within 103 trillion version-4 UUIDs is one in a billion.
It's also highly unlikely "every device on Earth" is going to install and play your game.
 
Last edited:
Top