Get android Id - Android android.content

Android examples for android.content:Context

Description

Get android Id

Demo Code

import android.content.Context;
import android.provider.Settings.Secure;

public class Main {

  public static String androidId(Context context) {
    return Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);
  }//from ww  w .  j  a v a  2 s .  c om

}

Related Tutorials