3

While working on an android app, which is a game for kids, We decided to skip the login as it was obstructing the kids' engagement. So now I have to save the user data of the users on a server. But since there is no authentication how can I manage to save the data on a server. I guess a number of gamified apps don't have login feature. How do they manage to save their user data on a centralized server?

I am using pouch-db on the app side to store data on the local side. So I tried using couch-db for storing data on backend. But again I am stuck with the authentication part.

kartik
  • 583
  • 8
  • 24

2 Answers2

5

Every phone has a key and google account. You can use the google account to connect the app with you server.

TelephonyManager tManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
String uuid = tManager.getDeviceId();

You also need android.permission.READ_PHONE_STATE set in your Manifest.

See this anwser : https://stackoverflow.com/a/38782876/1339179

Community
  • 1
  • 1
Sigiria
  • 79
  • 1
  • 10
  • Could you please share some relevant link, like google documentation. Thanks – kartik Oct 19 '16 at 13:59
  • Look here: http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id. Why are you not using the email adress? A email adress is unique. Just without Sign-In. – Sigiria Oct 20 '16 at 06:05
  • We are not using email address to sign in as it is too complex for kids to understand. I am looking for a way to authenticate user without actually making them notice, as you said that every phone has a key and is already attached to a google account , so is there a way to use that authorization with the app – kartik Oct 20 '16 at 06:56
  • You didn´t get me. – Sigiria Oct 26 '16 at 07:06
  • Every phone has already a sign in google account, so you can use this email address. Obviously android phone need a google account to download an app. – Sigiria Oct 26 '16 at 07:11
3

Like sigiria said, every phone has key so you can use the google signin.

Look at this link : https://developers.google.com/identity/sign-in/android/

Rémy
  • 313
  • 3
  • 17
  • As mentioned the app is for kids, and we do not want to obstruct the normal flow of app. The above link suggests to use conventional google login. Is there any way to authenticate user without showing a google login popup, provided that the user is already logged in on the device by google id. – kartik Oct 20 '16 at 05:18
  • If you don't want login view or google sigin, i don't know how to do, sorry – Rémy Oct 20 '16 at 10:56