get Sim Serial Number - Android Hardware

Android examples for Hardware:Sim Card

Description

get Sim Serial Number

Demo Code


//package com.java2s;

import android.content.Context;
import android.telephony.TelephonyManager;

public class Main {
    public static String getSimSerialNumber(Context context) {
        TelephonyManager tm = (TelephonyManager) context
                .getSystemService(Context.TELEPHONY_SERVICE);
        return tm.getSimSerialNumber();
    }/*from www  .j ava  2s  .  co  m*/
}

Related Tutorials