From my app, the user can text/call a person. I am starting an Activity through Intent in my app, currently 1 for texting and 1 for the dialer, is it possible to combine these, e.g. so when user clicks a button to call/text it brings up a list of texting/dialer apps in 1 window ?
Dialer:
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:" + somenumber));
startActivity(callIntent);
Messaging app:
Intent callIntent = new Intent(Intent.ACTION_PROCESS_TEXT);
callIntent.setData(Uri.parse("tel:" + somenumber));
startActivity(callIntent);
What I want to do is, instead of having two separate buttons 1 for text and 1 for call, I want to have 1 and when clicked, it should allow users to either call or text.
You can achieve this using
Intent.EXTRA_INITIAL_INTENTS
accompanied by queryIntentActivities.Little complex but it will work try the below code..
Best Luck..!