Pick activity

Action: 
android.intent.action.PICK_ACTIVITY
Input: 
data should be empty.<br/> get*Extra field EXTRA_INTENT is an Intent used with queryIntentActivities(Intent, int) to determine the set of activities from which to pick.
Intent Extra: 
Intent
Output: 
Class name of the activity that was selected.

Pick an activity given an intent, returning the class selected.

See Android documentation

Example: Pick an application

// Pick an application
Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
 
Intent pickIntent = new Intent(Intent.ACTION_PICK_ACTIVITY);
pickIntent.putExtra(Intent.EXTRA_INTENT, mainIntent);
startActivityForResult(pickIntent, 0);
 
// The result is obtained in onActivityResult:
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   if (data != null) {
      // launch the application that we just picked
      startActivity(data);
   }
}

Note: The PICK_ACTIVITY intent only works in SDK 1.5 or higher. In SDK 1.1 this code does not work.
A backward compatible implementation of the activity picker can be found in the source code of the OI Locale bridge.