sim-card

Android: how to add a contact to the SIM using the SDK?

那年仲夏 提交于 2019-12-30 03:13:10
问题 I am writing an application which writes contacts in the SIM card of an Android phone. I am stuck at the point where the phone number is added: an exception occurs with no apparent reason. Here is a snippet of code. import android.app.Activity; import android.content.ContentResolver; import android.content.ContentUris; import android.content.ContentValues; import android.provider.ContactsContract.RawContacts; import android.provider.ContactsContract.Data; import android.provider

how to get MSISDN number in WAP using PHP?

最后都变了- 提交于 2019-12-30 01:36:33
问题 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. 回答1: 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

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

你离开我真会死。 提交于 2019-12-29 06:33:50
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: How to fetch own mobile number in android How to get the telephone number associated with the SIM in a GSM phone? 回答1: 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

Access the SIM Card with an Android Application?

痞子三分冷 提交于 2019-12-28 02:39:29
问题 I wonder if it's possible to access to the SIM card with an Android Application 回答1: You can get the IMEI like this (but is it what you want ?), just an exemple : mTelephonyMgr = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); String imei = mTelephonyMgr.getDeviceId(); Likewise, you have String getSimCountryIso(): Returns the ISO country code equivalent for the SIM provider's country code. String getSimOperator(): Returns the MCC+MNC (mobile country code + mobile network code)

when adding contacts to sim card, they are only displayed after rebooting the device

五迷三道 提交于 2019-12-24 04:48:13
问题 I am trying to add contacts to SIM Card, they seem to be added to the SIM Card but they're only visible after rebooting the device (even to the native People app).. Here is the code I'm using: final Uri uri = Uri.parse("content://icc/adn"); ContentValues mContentValue = new ContentValues(); mContentValue.put("tag", contactName); mContentValue.put("number", contactNumber); getContentResolver().insert(uri, mContentValue); is it a problem with sync'ing the contacts db after creating the contacts

Is it possible to use SIM card to mutual authentication on access to a secure web server with Android?

妖精的绣舞 提交于 2019-12-24 00:04:23
问题 My intention is to use Android (browser) to mutual authenticate on a web server. For that would be nice if the Public Cert from the SIM card could be use and the signing operation from the SIM card with PIN. Android is not the priority, Symbian or other hypothesis are to be considered, since they allow the usage i'm asking for. 来源: https://stackoverflow.com/questions/9026828/is-it-possible-to-use-sim-card-to-mutual-authentication-on-access-to-a-secure-we

SW 0x6f50 when trying to install crypto applet

岁酱吖の 提交于 2019-12-23 03:47:07
问题 I am trying to install an applet which uses security classes ( Cipher , RandomData and MessageDigest ), but always get an 6F50 error when trying to install it. The package is loaded correctly but the applet cannot be instantiated. I am allocating all objects in the constructor and the algorithms are supported by the card (at least according to the datasheet). If I comment out all security classes references, the applet loads and installs properly. I've tried allocating byte[] and Object 's

Sign App with UICC Carrier Privileges Certificates

喜夏-厌秋 提交于 2019-12-18 13:54:18
问题 I was reading information on this link in regards to signing an application with carrier privileges. I am aware of how to sign an application using a keystore for production releases, but how do I add UICC certificates to my app so it gets carrier privileges? My main goal is to be able to call TelephonyManager functions like: iccOpenLogicalChannel iccCloseLogicalChannel iccTransmitApduLogicalChannel iccTransmitApduBasicChannel This is the stack trace I get when calling one of the above

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

半腔热情 提交于 2019-12-18 12:47:06
问题 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) 回答1: 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

Android SIM change

泄露秘密 提交于 2019-12-18 11:13:56
问题 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(); 回答1: 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