1

On my phone sometimes when i try to make a particular action, a menu shows up, and ask me to choose between different installed applications that could perform that action, like for example when i try to make a call, that menu gives me the choice between 'Call', 'Skype' and 'Viber'.

what do we call this type of menus?

I'm working on an application, and i want that when i click on an imageView the menu shows up, and give me the choice to select a source for that imageView, either from gallery or take a new image using Camera.

is it possible to use this type of menus in this case?

Hossam Oukli
  • 1,217
  • 3
  • 16
  • 38

1 Answers1

4

This is called an Intent chooser.

http://developer.android.com/training/sharing/send.html#send-text-content

If there's an installed application with a filter that matches ACTION_SEND and MIME type text/plain, the Android system will run it; if more than one application matches, the system displays a disambiguation dialog (a "chooser") that allows the user to choose an app.

In case you want to use it with Camera or Gallery, 1 minute of search would have let you get those answers:

Dialog to pick image from gallery or from camera

Allow user to select camera or gallery for image

Android How can I call Camera or Gallery Intent Together

Community
  • 1
  • 1
Waza_Be
  • 39,545
  • 47
  • 176
  • 256