Here you can find the source of getIMEI(Context context)
public static String getIMEI(Context context)
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.telephony.TelephonyManager; public class Main { public static String getIMEI(Context context) { TelephonyManager tm = (TelephonyManager) context .getSystemService(Context.TELEPHONY_SERVICE); if (tm == null) { return null; }//from www . j a va 2 s . c o m return tm.getDeviceId(); } }