public class

CameraImagePickerFragment

extends BaseImagePickerFragment
java.lang.Object
   ↳ androidx.fragment.app.Fragment
     ↳ com.pspdfkit.document.image.BaseImagePickerFragment
       ↳ com.pspdfkit.document.image.CameraImagePickerFragment

Class Overview

Fragment used for firing up the camera for capturing an image.

Summary

[Expand]
Inherited Fields
From class com.pspdfkit.document.image.BaseImagePickerFragment
Public Constructors
CameraImagePickerFragment()
Public Methods
void onCreate(Bundle savedInstanceState)
void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults)
void onSaveInstanceState(Bundle outState)
Protected Methods
Intent getImagePickerIntent()
Creates an intent to start image picking activity, an image gallery or a camera.
int getRequestCode()
Gets request code to be given to the intent when starting image picker activity for result.
void onImagePickerResult(int resultCode, Intent data)
Called when image picker gets result from the activity it started, whether camera or image picker.
void queueStartActivityForResult(Intent intent)
Start activity for result with a given intent, or queues it up if the fragment is still not active.
[Expand]
Inherited Methods
From class com.pspdfkit.document.image.BaseImagePickerFragment
From class androidx.fragment.app.Fragment
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.view.View.OnCreateContextMenuListener
From interface androidx.lifecycle.LifecycleOwner
From interface androidx.lifecycle.ViewModelStoreOwner

Public Constructors

public CameraImagePickerFragment ()

Public Methods

public void onCreate (Bundle savedInstanceState)

public void onRequestPermissionsResult (int requestCode, String[] permissions, int[] grantResults)

public void onSaveInstanceState (Bundle outState)

Protected Methods

protected Intent getImagePickerIntent ()

Creates an intent to start image picking activity, an image gallery or a camera.

Returns
  • Image picking activity intent.

protected int getRequestCode ()

Gets request code to be given to the intent when starting image picker activity for result.

Returns
  • Request code for the fragment.

protected void onImagePickerResult (int resultCode, Intent data)

Called when image picker gets result from the activity it started, whether camera or image picker.

Parameters
resultCode Result code received from the activity.
data Received data.

protected void queueStartActivityForResult (Intent intent)

Start activity for result with a given intent, or queues it up if the fragment is still not active.

Parameters
intent Intent to be fired.