I'm making an app that dials a specific number on the click of a button, however, if the person has dual sim, I want to be able to let him choose which sim to use, since it works on only one service provider,
here is the code that I have so far, is there anyway to check if there is dual sim and then make the user choose which sim to call from ?
I did a search and found that the latest API has built in dual sim support, however my app won't work well with kitkat
This is my code:
public void updateBalance(View view) {
Intent intent = new Intent(Intent.ACTION_DIAL);
intent.setData(Uri.parse(String.format("tel:%s", Uri.encode("*121#"))));
startActivity(intent);
}
EDIT
so basically what I am trying to do is the following
public void updateBalance(View view) {
if (dual sim){
Intent intent = new Intent(Intent.ACTION_DIAL);
}
else{
Intent intent = new Intent(Intent.ACTION_CALL);
}
intent.setData(Uri.parse(String.format("tel:%s", Uri.encode("*121#"))));
startActivity(intent);
}