CloudStore database.

125 views
Skip to first unread message

Godswill Ikeagwu

unread,
Jul 25, 2022, 2:11:28 PM7/25/22
to DroidScript
To my current knowledge about droidscript CloudStore. It's very great to store data and media files. But is there a way that data can be used to store users sign up and login details which will give a specific id to any logged in user. Please can anyone help me with this. I'll so much appreciate it. What i just need is the logic to use, I can work on the codes but if you will be kind of enough to throw some code tips I'll accept it. Thanks

Ignas Bukys

unread,
Jul 27, 2022, 4:06:16 AM7/27/22
to DroidScript
If I understand your requirement correctly. You have two options if you want to have unique ID's
If you want to have logged in user, that may have multiple devices in his custody
user =  app.GetUser()
or you may have unique device ID
devId = app.GetDeviceId()

Godswill Ikeagwu

unread,
Jul 27, 2022, 8:22:04 AM7/27/22
to DroidScript
Ignas
Thanks for your reply but I thought DS app.GetUser function returns the email of the user. How can I use it and implement a user ID. Sorry if my question lacks experience but i just need more enlightenment. Thanks

Alan Hendry

unread,
Jul 27, 2022, 5:21:35 PM7/27/22
to DroidScript
HI,
Premium developers can apply for a CloudStore key, which is used like this
cld = app.CreateCloudStore( apiKey ) 
(normally CloudStore is then used to store data like high-scores in a game, that are common to everyone).
You could try storing data for individual users by using their email address as filename (possibly substituting dots and @ signs)
but all the users combined would be included in the CloudStore limitations for the key.
The alternative would be for each user to have a key (that you or the users would have to pay for).
Regards, ah

Dave

unread,
Aug 2, 2022, 3:22:52 PM8/2/22
to DroidScript
It's generally not a good idea to store people's email addresses unless you absolutely need them and can get consent from the users because of GDPR rules.

You can however anonymise a user's email address and create a unique id from it by using an MD5 hash function.  This will generate a unique code from the email address that cannot be reverse engineered to get the original email address.

See the 'Security Encryption' example for how to use MD5

Note:  If you use the app.GetDeviceId() as a unique user id, it might change if the user un-installs and re-installs your app on modern versions of Android (for security reasons)
Reply all
Reply to author
Forward
0 new messages