Hello...
Sometimes we need to know the country code, IMEI number, subscriber of a phone.
Their is very simple solution, For this android gives facility to know it by providing TelephonyManager class.
TelephonyManager have many methods to get information like serial number, Subscriber id, IMEI number, country code etc
We need to add this permission in manifest file.
<uses-permission android:name=<"android.permission.READ_PHONE_STATE>
We use it like this
String myCountryCode,imeiNumber,serialNumbe,softwareVersionr;
TelephonyManager myTeleManager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
myCountryCode = myTeleManager.getSimCountryIso();
imeiNumber = myTeleManager.getDeviceId();
serialNumber = myTeleManager .getSimSerialMumber()
softwareVersionr = myTeleManager.getDeviceSoftwareVersion();
0 Comment(s)