Code Snippet to get device information,
String deviceId_str,softwareVersion_str ,simSerialNo,voicemailNumer_str,
sim_operator_Name;
sim_operator_Name;
TelephonyManager telephonyManager = null;
telephonyManager = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
// device Id
deviceId_str = telephonyManager.getDeviceId();
// software version
softwareVersion_str = telephonyManager.getDeviceSoftwareVersion();
// serial number
simSerialNo = telephonyManager.getSimSerialNumber();
//voice mail number
voicemailNumer_str = telephonyManager.getVoiceMailNumber();
// sim operator name
sim_operator_Name= telephonyManager.getSimOperatorName();
Android Permission :
android.permission.READ_PHONE_STATE, needs to be included in manifest file.
Time is essence!!!!!!!!!
ReplyDelete