Exercising the ACTION_PICK

So far, we have exercised intents or actions that mainly invoke another activity without expecting a result back. Let's look at an action that is a bit more involved and returns a value after being invoked. ACTION_PICK is one such generic action.

The idea of ACTION_PICK is to start an activity that displays a list of items. The activity then should allow a user to pick one item from that list. Once the user picks the item, the activity should return the URI of the picked item to the caller. This allows reuse of the UI's functionality to select items of a certain type.

You should indicate the collection of items to choose from using a MIME type that points to an Android content cursor. The MIME type of this URI should ...

Get Pro Android 4 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.