Java tutorial
//package com.java2s; //License from project: Open Source License import android.app.Application; import android.content.Context; import android.telephony.TelephonyManager; public class Main { private static Application CONTENT = null; public static String getIMEI() { return getSimNo(CONTENT); } private static String getSimNo(Context context) { TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); return tm.getDeviceId(); } }