Device Id Access

Asked

Viewed 39 times

2

I’m developing an app Android and would like to use the Device ID where the application is run to compose an identification.

It is possible to access this information?

The idea is to identify the application user by a field composed by the device id (which I believe is unique) and other information still in studies.

  • Hello vtra, consider accepting my answer if it has been useful to you. If you think she’s incomplete or doesn’t respond to you, make the appropriate comments so I can improve her.

1 answer

4

That’s possible:

import android.provider.Settings.Secure;

private String android_id = Secure.getString(getContext().getContentResolver(), ANDROID_ID); 

Originally taken of this question.

Settings.Secure Documentation

Browser other questions tagged

You are not signed in. Login or sign up in order to post.