Domanda

Sto usando il codice

TelephonyManager tMgr =(TelephonyManager)mAppContext.getSystemService(Context.TELEPHONY_SERVICE);
  mPhoneNumber = tMgr.getLine1Number();

Per ottenere il telefono non programmaticamente in Android. Ma questo funziona bene solo per una scheda SIM. Se testa questo codice inserendo altre schede SIM, sta dando null. Sto cercando di trovare la soluzione per questo. mi aiuti per favore. Ho anche incluso READ_PHONE_STATE permesso in Manifest.

Voglio identificare in modo univoco la scheda SIM. C'è un altro modo di fare questo. Per favore mi faccia sapere.

Nessuna soluzione corretta

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top