2

Hello Friends i Develop one application of SIM card information is working very well. but immediately i found in tablet p650 it not display simcard number , i check it in phone and imulator it working well but check in tablet it not give simcard number. So for tablet to find simcard number any other code ??? please friends ans quickly thanks in advance

  • Sim card information varies according to the carriers. – amalBit Apr 05 '14 at 06:41
  • i dont understand your answers if i want to know how simcard number detected from the tablet what i should do ??? –  Apr 05 '14 at 06:47

1 Answers1

0

You might need to check this first:

final TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
if (telephonyManager.getSimState() == TelephonyManager.SIM_STATE_ABSENT) {
   // Oh, darn! No SIMCARD in device.
} else {
   // Hooray, found a SIMCARD! Then, do something.
   String simSerial = telephonyManager.getSimSerialNumber();
}
ChuongPham
  • 4,761
  • 8
  • 43
  • 53
  • I already have simcard and also found on both of tablet and phone just i have problem with only simcard number , i found all inforamtion about simcard in tablet and phone both but just simcard number only not found in tablet. above condition already checked. but my problem is just with simcard number/phone number not detected in tablet. –  Apr 05 '14 at 06:56
  • If you have tried `telephonyManager.getSimSerialNumber()` and got nothing, then I'm afraid there's nothing you can do about it as network carriers are not obliged to provide this information in Android. – ChuongPham Apr 05 '14 at 07:00
  • i also got sim serial number through telephonyManager.getSimSerialNumber() in tablet ,i just sim card number not got. and once more i got all the info of sim remain only sim/phone number in single sim tablet. –  Apr 05 '14 at 07:20
  • I really don't understand your last comment. But, I guess if you're referring to dual-sim devices, well, Android currently does not support this as there is no public method to interrogate devices with dual sim. – ChuongPham Apr 05 '14 at 07:23
  • i know that, when device is dual sim i check condition for dual sim if phone is dual sim then i give message of "dual sim" in phone number and remain single sim info i displayed to user.now it well in both now i checked in phone and imulator it working well, but when i checked in single sim table it not display sim card number even it working with mobile –  Apr 05 '14 at 07:28
  • _"but when i checked in single sim table it not display sim card number even it working with mobile"_ - Well, I have answered this point in my first comment above. Worst case scenario, you may need to direct this query to the device's manufacturer themselves and ask for a response. – ChuongPham Apr 05 '14 at 07:31
  • simply getSimNumber = telemamanger.getLine1Number(); txtGetPhone.setText(getSimNumber + simCheckdual); if (isDualSIM == true) { simCheckdual = "Dual SIM"; } else { simCheckdual = "\nSingle SIM Phone"; } output in phone and imulator of dual sim::Dual sim phone output in phone and imulator of single sim::sim no + single sim phone output in phone and imulator of single sim::blanks+ single sim phone –  Apr 05 '14 at 07:38