Java tutorial
//package com.java2s; import android.content.Context; import android.provider.Settings.Secure; public class Main { public static String getDeviceId(Context ctxt) { return Secure.getString(ctxt.getContentResolver(), Secure.ANDROID_ID); } }