I have an ImageButton that trigger the Call Intent. I want to know if it is possible to pass 2 numbers as data, so that when you tap the button, it opens automatically a popup which let you choose the number to call. This should be the default Android behavior for your contacts, if you have more than one number associated with the contact you’re trying to call, it gives you the options.
my code is something like this:
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("1234567890"));
startActivity(callIntent);
I tried to put multiple number separeted by semi colon, but is not working:
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("1234567890;0987654321"));
startActivity(callIntent);
Does anyone have a solution for this?
Thanks
Manuel
I dont think there exits any such thing programmatically.
But you can try something like this,On click of image button :
1) If only 1 number, use the code you have written.
2) If multiple numbers, open a dialog box(You need to create that all by yourself) and let user choose the number, and then redirect the number to your code