4

I'm trying to write a program that change default SIM card on my dual-sim android, what functions do I need for this?

nobody
  • 19,814
  • 17
  • 56
  • 77
Max
  • 515
  • 1
  • 5
  • 6

2 Answers2

5

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.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
1

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://labs.mediatek.com/site/global/developer_tools/mediatek_android/api_references/mediatek-sdk3/reference/com/mediatek/telephony/TelephonyManagerEx.gsp

Budimir Grom
  • 756
  • 6
  • 12
  • I've reviewed the page you suggested and it does not seem to provide any information on how to *change state* of the SIM cards. The TelephonyManagerEx class appears to have methods only for *querying* the state :( – DmytroL Jan 05 '15 at 21:31
  • @DmytroL: You're right. It's just the beginning, an example that those things can be done. I'm successfully toggling data, cards and doing all I need in this app: https://play.google.com/store/apps/details?id=rs.org.nopo.dualsimcontrol – Budimir Grom Jan 06 '15 at 08:34
  • @NikolaTulimirovic,do you have any code sample to achieve toggling enable/disable data for simcard? – zoom Feb 10 '16 at 13:33