get Local Picture via Intent - Android Intent

Android examples for Intent:Picture Pickup

Description

get Local Picture via Intent

Demo Code


//package com.java2s;

import android.app.Activity;
import android.content.Intent;

public class Main {
    public static final int LOCAL_PICTURE = 3;

    public static void getLocalPicture(Activity ac) {

        Intent intent = new Intent();
        intent.setType("image/*");
        intent.setAction(Intent.ACTION_GET_CONTENT);

        ac.startActivityForResult(intent, LOCAL_PICTURE);
    }//from ww w  .  j a  v  a2  s .  c om
}

Related Tutorials