Skip to content Skip to sidebar Skip to footer

Intent.action_call Is Not Working When A Pop Up Window Opens To Select My Account

I am implementing an Android app that will allow users to purchase something by dialing a number from my app pressing a button. In single SIM devices it works nicely, but in dual s

Solution 1:

You must specify the simcard to start the intent activity. First of all, check if the phone is Dual Sim with this link: https://stackoverflow.com/a/17499889/3743245

After that, try to ask the user which simcard he/she will use and pass that info like this:

intent.putExtra("com.android.phone.extra.slot", 0); //For sim 1

or

intent.putExtra("com.android.phone.extra.slot", 1); //For sim 2

and if doesn't work try this:

intent.putExtra("simSlot", 0); //For sim 1

or

intent.putExtra("simSlot", 1); //For sim 2

Solution 2:

Simply write these two line of code rest of thee this will automatically done by the system hear you don't worry about single/dual SIM

IntentcallIntent=newIntent(Intent.ACTION_VIEW, Uri.parse("tel:"+"999999");
            startActivity(callIntent);
        } 

refer official guide for more detail http://developer.android.com/reference/android/content/Intent.html

Post a Comment for "Intent.action_call Is Not Working When A Pop Up Window Opens To Select My Account"