Hi all
I'm new to b4A (just some hours) and i wanted to make a sample to get SIM-CARD info
here is the code in Eclipse IDE:
BUT i don't know how to use it here ! could anyone help me please?
Kind Regards.
I'm new to b4A (just some hours) and i wanted to make a sample to get SIM-CARD info
here is the code in Eclipse IDE:
B4X:
...
....
import android.content.Context;
import android.telephony.TelephonyManager;
.........
TelephonyManager telMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
int simState = telMgr.getSimState();
switch (simState) {
case TelephonyManager.SIM_STATE_ABSENT:
// do something
break;
case TelephonyManager.SIM_STATE_NETWORK_LOCKED:
// do something
break;
case TelephonyManager.SIM_STATE_PIN_REQUIRED:
// do something
break;
case TelephonyManager.SIM_STATE_PUK_REQUIRED:
// do something
break;
case TelephonyManager.SIM_STATE_READY:
// do something
break;
case TelephonyManager.SIM_STATE_UNKNOWN:
// do something
break;
}
BUT i don't know how to use it here ! could anyone help me please?
Kind Regards.
Last edited: