Android examples for Hardware:Sim Card
get Phone Subscriber Id
//package com.java2s; import android.content.Context; import android.telephony.TelephonyManager; public class Main { public static String getSubscriberId(Context context) { TelephonyManager tm = getTelephonyManager(context); if (tm != null) { return tm.getSubscriberId(); }/*from w w w . j av a 2 s . c o m*/ return null; } private static TelephonyManager getTelephonyManager(Context context) { return (TelephonyManager) context .getSystemService(Context.TELEPHONY_SERVICE); } }