Imagine an application consisting of client downloads and a single server. Clients should be able to use the application without having to register a username, for example. (Therefore, getting a sense of anonymity using the app)
What unique data in a smartphone can be used to identify "anonymous" users and share them uniquely so that each user has their own personal data.
Can i use IMEI?
Is it possible?
I/O 15 Google " ", .
, :fooobar.com/questions/401/...
IMEI, ... .
, , , , 1, .. ..
:
import android.provider.Settings.Secure; private String uniqueIdentifier = Secure.getString(getContext().getContentResolver(), Secure.ANDROID_ID);
Secure.ANDROID_ID "64- ( ), , ".
IMEI, , . Wi-Fi.
, IMEI, .
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
GUID SQLite Android ID.
Android ID , .
, , Instance ID, Google Play Services, AOSP/ (, Amazon). , .
: , .
This works on both phones and tablets (something is not in IMEI) and avoids problems with ANDROID_ID(for example, several manufacturers always use the same ANDROID_IDon all devices).
ANDROID_ID