0

Hello I need to search in the phone and list all the applications that when trying to launch an Intent(Intent.ACTION_CALL) these support it. I don't know if it's possible, I checked the implementation of the Intent.createChooser() method, but I wasn't lucky.

What I really want to do, is a view where the user can configure the application he wants to use when he wants to perform the action of calling someone. That's why I need to search all the applications that the user has in the phone that support the Intent.ACTION_CALL to show them in a list. After the user selects the application he wants, I manage for when the user is going to make calls, launch the application he selected.

Thanks

  • Check link here: https://stackoverflow.com/questions/15407502/how-to-check-if-an-intent-can-be-handled-from-some-activity – Shiv Anand Dec 19 '18 at 18:00
  • Possible duplicate of [How to check if an intent can be handled from some activity?](https://stackoverflow.com/questions/15407502/how-to-check-if-an-intent-can-be-handled-from-some-activity) – M. Prokhorov Dec 19 '18 at 18:07

1 Answers1

0

Try using this piece of code

if (intent.resolveActivity(getPackageManager()) != null) {
     Intent.createChooser(intent, "Choose an app");
}

This will check if there is an app available to complete this action.

Charan M
  • 489
  • 3
  • 7