sim-card

how to detect if PIN code is required to unlock sim?

喜夏-厌秋 提交于 2019-11-30 07:41:29
There is a "SIM card lock" option in android "setting/Location & security settings" page. It's necessary to input a PIN code after booting if the option is set. Is there any programmatic method to detect if PIN is required ? (not current sim state but the setting option value ex: true/false) You can use the following class: TelephonyManager http://developer.android.com/reference/android/telephony/TelephonyManager.html You do not instantiate this class directly; instead, you retrieve a reference to an instance through Context.getSystemService(Context.TELEPHONY_SERVICE) TelephonyManager manager

how to get MSISDN number in WAP using PHP?

假装没事ソ 提交于 2019-11-30 05:27:49
I have developed a WAP application and I would like to get the MSISDN of the users that visit my site. My operator has white listed my WAP application. I am getting MSISDN successfully on couple of Samsung Mobiles, but not getting same result on Nokia, BlackBerry & iPhone deviceas. Please suggest me best way to get MSISDN number for all devices. The ability to get the MSISDN of the user visiting the WAP site depends on a number of things. Firstly, the user has to be on Mobile Data. If the user is on WiFi then you will not receive this information. Secondly, the users mobile network has to

Android SIM change

Deadly 提交于 2019-11-30 02:29:12
Is it possible to detect SIM number using TelephonyManager in android at boot startup ,using Service at bootup... TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String ss=tm.getSimSerialNumber(); You need to register a broadcast receiver for the boot completion action i.e android.intent.action.BOOT_COMPLETED in onReceive of this receiver you can start your service get SIM number with below code lines TelephonyManager telephoneMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String phoneNumber = telephoneMgr.getLine1Number(); Also need

Android: how to access the SIM contact table using the SDK?

試著忘記壹切 提交于 2019-11-29 07:14:27
I am trying to use this query to read the contacts on the SIM. cur = managedQuery(Uri.parse("content://icc/adn") ,null ,null ,null ,null ); The application has READ_CONTACTS and WRITE_CONTACTS permissions. Yet, the query returns an exception. java.lang.NullPointerException at android.os.Parcel.readException(Parcel.java:1224) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:160) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:114) at android.content.ContentProviderProxy.bulkQuery(ContentProviderNative.java:369) at android.content

How to get the telephone number associated with the SIM in a GSM phone? [duplicate]

﹥>﹥吖頭↗ 提交于 2019-11-29 05:23:25
Possible Duplicate: How to fetch own mobile number in android How to get the telephone number associated with the SIM in a GSM phone? try following code TelephonyManager tMgr=(TelephonyManager)mAppContext.getSystemService(Context.TELEPHONY_SERVICE); mPhoneNumber = tMgr.getLine1Number(); and with following permission in your xml READ_PHONE_STATE 来源: https://stackoverflow.com/questions/5163803/how-to-get-the-telephone-number-associated-with-the-sim-in-a-gsm-phone

Detect changes of “Lock SIM card” in Settings/Security/Set up SIM card lock

耗尽温柔 提交于 2019-11-29 02:46:51
A question aimed at Android 4.0.x preferably. I want to detect immediately, or after a few seconds, any change made to Lock SIM card in Settings > Security > Set up SIM card lock . I tried 3 methods: 1) access read-only com.android.settings shared preferences. Context settings = getApplicationContext().createPackageContext("com.android.settings", Context.CONTEXT_IGNORE_SECURITY); SharedPreferences prefSettings = settings.getSharedPreferences("com.android.settings_preferences", MODE_WORLD_READABLE); Map<String, ?> allSettings = prefSettings.getAll(); for(String s : allSettings.keySet()){ //do

How do I access Android STK Menu using APK?

限于喜欢 提交于 2019-11-29 01:35:12
I would like to access the SIM menus on an Android phone using STK. I am trying to write an APK that shows the SIM Menus and perform operations on it. However, since the software would be used by users, replacing the OS core modules may not be an option. How can I do this? This is, unfortunately, not possible. SimToolkit applications are protected from use by other applications because they could incur charges for the user or alter his connectivity state without his knowledge or consent. The SimToolkit application (which is signed by the manufacturer or mobile operator so that it has special

Dual-SIM Change Default SIM card

落花浮王杯 提交于 2019-11-28 11:38:32
I'm trying to write a program that change default SIM card on my dual-sim android, what functions do I need for this? The Android SDK has no support for manipulating multiple SIM cards. You will need to contact the manufacturer of your device and ask them if they have an SDK add-on or something that enables you to work with multiple SIM cards. If your phone is based on Mediatek, there is a way to do what you want to. Have no doubt about that. Dual SIM Switch Widget (I've developed it) is able to control SIM states on most dual SIM devices with Mediatek's boards. Take a look at this page: http:

Is it possible to determine if the SIM/Phone number has changed?

。_饼干妹妹 提交于 2019-11-28 06:02:32
We have a product where the user registers by providing their phone number. However after they register they could potentially change their sim. Is it possible to programatically determine if the sim has been removed or inserted? (Thanks if you provide it, but any digression comments on the use of using the phone number in the first place would be irrelevant to this discussion, I don't want to discuss that aspect of things, only the sim aspect). Oleg Trakhman Yes, of course it is possible. Link CoreTelephony.framework to make following code compile: CTTelephonyNetworkInfo* info = [

Android: how to access the SIM contact table using the SDK?

谁说胖子不能爱 提交于 2019-11-28 00:54:34
问题 I am trying to use this query to read the contacts on the SIM. cur = managedQuery(Uri.parse("content://icc/adn") ,null ,null ,null ,null ); The application has READ_CONTACTS and WRITE_CONTACTS permissions. Yet, the query returns an exception. java.lang.NullPointerException at android.os.Parcel.readException(Parcel.java:1224) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:160) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:114) at