Java tutorial
//package com.java2s; //License from project: Apache License import android.app.Activity; import android.content.Intent; public class Main { public static void openImageAction(Activity activity, int requestCode) { Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); intent.addCategory(Intent.CATEGORY_OPENABLE); activity.startActivityForResult(intent, requestCode); } }