Android Intent Create pickNcapture(Activity activity, Uri outputFileUri)

Here you can find the source of pickNcapture(Activity activity, Uri outputFileUri)

Description

pick Ncapture

Declaration

public static void pickNcapture(Activity activity, Uri outputFileUri)

    

Method Source Code

//package com.java2s;
import android.app.Activity;
import android.content.Intent;

import android.net.Uri;

import android.provider.MediaStore;

public class Main {
    public static int PICKnCAPTURE_REQUEST_CODE = 1402;

    public static void pickNcapture(Activity activity, Uri outputFileUri)

    {//from   w w w .  j ava 2 s. c  o  m
        Intent pickIntent = new Intent();
        pickIntent.setType("image/*");
        pickIntent.setAction(Intent.ACTION_GET_CONTENT);
        Intent takePhotoIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
        takePhotoIntent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
        String pickTitle = "Select or take a new Picture";
        Intent chooserIntent = Intent.createChooser(pickIntent, pickTitle);
        chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS,
                new Intent[] { takePhotoIntent });

        activity.startActivityForResult(chooserIntent,
                PICKnCAPTURE_REQUEST_CODE);
    }
}

Related

  1. getSysAppSearchIntent(String key)
  2. intentAvailable(Context context, Intent intent)
  3. intentFromByteArray(byte[] byteArray)
  4. newXdiPlayIntent()
  5. shareImages(Activity activity, String imagePath)
  6. organizeAndStart(Activity activity, Class classes, Map paramMap)
  7. onKeyBackGoHome(Activity activity, int keyCode, KeyEvent event)
  8. makeCall(Activity activity, String telNumber)
  9. PhotoIntent(Activity activity)