Intents in ApiDemos

ApiDemos/App/Activity/Intents

Source code

  1. Intents.java contains the Activity.
  2. intents.xml
  3. strings.xml

Activity chooser

The onClick method of the OnClickListener displays an activity chooser if more than one Activity matches the intent.

		Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
		intent.setType("audio/*");
		startActivity(Intent.createChooser(intent, "Select music"));