Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best way to uniquely identify Android users to a server?

Tags:

android

How should I go about identifying an android user to a server. Should I get the IMSI number and some salting algorithm? Considering androids space and performance limitations is there a library that isn't too heavy that I can use to do the calculation?

like image 439
Christian Avatar asked Oct 18 '10 15:10

Christian


2 Answers

I think you cannot identify a user without any kind of account. Everything else is not reliable or only a device identification. Why don't you provide an own registration service for your server, so you can give an unique id to every user.

Another option might be the Google account which is bound to the device? Or will this cut you target audience for your up? But if you're building an app which extends some sort of Google tool, app or whatever then user will already have a Google account so your app could also use it to identify the user.

like image 121
Flo Avatar answered Oct 20 '22 01:10

Flo


As stated by developer.android:

Applications typically try to remember the user using one of three techniques:

  1. Ask the user to type in a username
  2. Retrieve a unique device ID to remember the device
  3. Retrieve a built-in account from AccountManager

Option (1) is problematic. First, asking the user to type something before entering your app will automatically make your app less appealing. Second, there's no guarantee that the username chosen will be unique.

Option (2) is less onerous for the user, but it's tricky to get right. More importantly, it only allows you to remember the user on one device. Imagine the frustration of someone who upgrades to a shiny new device, only to find that your app no longer remembers them.

Option (3) is the preferred technique. Account Manager allows you to get information about the accounts that are stored on the user's device. As we'll see in this lesson, using Account Manager lets you remember your user, no matter how many devices the user may own, by adding just a couple of extra taps to your UI.

like image 38
Aditya Avatar answered Oct 20 '22 00:10

Aditya