I need to develop an application to enable data of a dual-sim android phone.
For example, sometimes I need to enable data on the first sim, and other times for the second sim.
I discovered an api called mediatek
It is an api that allows us to manipulate dual sim. I take a look on the playstore, and then I found the application
Dual Sim Control which allow us to manipulate sim card of the phone.
When I look at the api reference of mediatek, I only see some method to get the sim card information but no method to change the sim information.
I need your help to enable or disable data on the dual sim android phone baseed on mediatek processor.
Thanks
Related
I want to detect the SIM type from an Android app. Whether it's an eSIM (embedded SIM) or not.
I'm playing with https://developer.android.com/reference/android/telephony/euicc/EuiccManager. But no success yet!
Android has an API to detect embedded SIM https://developer.android.com/reference/android/telephony/SubscriptionInfo#isEmbedded().
Mobile handsets can have dual SIMs, where each SIM (usually) has a single IMSI. However it is possible for a SIM card to have dual IMSI as well, and in fact IMSI that can be "configured on it" on-the-fly by operator. The latter mechanism is used for roaming scenarios, such as for business customers, where one (fixed) IMSI will be used by your home-country operator's phone number, and the other (flexible) IMSI that could be configured to visited-country operator's phone number (with whom your operator has a specific roaming arrangement). This way people can call you on either number, and you do not have to swap SIMs. Note that this was possible even before dual-SIM phones became relatively common.
For multi-SIM, I found some answers such as this one where one answer suggests using MultiSIM API (from 3rd party), and another answer suggests using the official supported API available since Android 5.1 (API level >22) or the unsupported TelephonyManager way from this answer (which I presume works for older API levels as well). However, it is not evident if those API's work for single SIM multi IMSI as well.
Unfortunately, I am yet to lay my hands on dual-IMSI SIM card to try this out. While I am trying to procure one, can anyone who has tried confirm or share findings ?
I'm not exactly sure what the question is, however a single SIM will only ever have one active imsi. Yes SIM cards can can multiple imsi's and an operator can update the imsi. However a SIM will only have ONE active IMSI.
A SIM can only have one active IMSI due to the SIM specification which says a IMSI must be stored in file ID:
3F00 (MF) -> 7F20 -> (DF_GSM) -> 6F07 (EF_IMSI).
A device (phone/modem) will request the IMSI from this file and only this file. if they were two "active" IMSI's no device currently would know where to find that IMSI without a firmware change.
I want to send sms using Dual Sim Mobile, make sim selection option, while sending sms.
I have vefiried this link fully:
Android : Check whether the phone is dual SIM
this question is based on this question only. thats why could not type the same program now.
Note: I have detected dual sim with its state also successfully using the above mentioned link program.
My Question: i have two sim,first sim airtel( having data connection), second sim is newly(Jio 4g) bought sim( waiting for Customer Care Activation)
when i detect sim state, both showing true only.then, i want to send sms using both sims.
Here Problem is : Sim State is showing both true. But, My Second sim tower is not showing.because of waiting for activation.
How to detect the two Sims having tower/Network having or not? This is my Problem
I have just tried with getNetworkType() method. But, Exactly, I dont know, How to check using this code in this dual sim options..
Please anyone help me to solve this issue
Thanks Advance
I am new to android and am making an app to send messages programmatic-ally . Since, I couldn't find a way to detect which SIM is used to send an SMS or that Dual SIM wasn't supported or applicable, my question is:
Is there a way to block a SIM Card in one's android phone? By "block" I mean, SIM_STATUS is returned to false by some means without actually removing the SIM from the SIM slot? Like, it stays there but is not ready to be used. Also, can i do the opposite?
And all this programmatic-ally without doing anything to the phone on manual basis.
By default android does not supported dual SIM. but
if u set default SIM for sms from android setting . your application will always send SMS from your default SIM
I have a dual sim Android phone. Using this solution I retrieve IMEI numbers of both sims.
Given the IMEI number, how can I find out the phone number of each sim?
There are methods getDeviceIdGemini(int slotId) and getSimStateGemini(int slotId) it is possible to find out the IMEI number and the state of each sims.
I'm looking for a similar method for reading the phone number of the sim.
You can't. Phone number it's not stored on sim card, it's stored on operator's servers. Look for TelephonyManager.getSubscriberId(), this will give the unique id for each SIM.
Programmatically obtain the phone number of the Android phone
Basic answer- there is no way to get your current phone number. There's things that sometimes work, but not always and not on all carriers.
No,
Android doesn't support dual sim devices.
See: Detect the status of two SIM cards in a dual-SIM Android phone
as Android does not support multiple SIMs, at least from the SDK.
You can contact your device manufacturer and see if they have an SDK add-on or something that allows you to access the second SIM.May be an API which can help youto get your desired result.
Although you can find out the status of the device whether it is Dual sim or not by using this link Android : Check whether the phone is dual SIM
Using reflection, I looked at the methods of TelephonyManager and found this method: int getLine1NumberGemini(int).
I tried to invoke it (getLine1NumberGemini(0) for first sim and getLine1NumberGemini(1) for the second). In both cases I received an empty string.
But the reason for this seems to be the inability of the phone to get the phone number of my sims:
TelephonyManager.getLine1Number() returns empty string as well.
When I open "Sim management" in the settings of the phone, no phone numbers are displayed.