Permissions

This page covers the description of the required permissions

If you want to read a document from the gallery, you need to make sure that your application has permission to read from external storage. You can check it using the following code:

Java
Kotlin
Java
// checking for image browsing permissions
if (ContextCompat.checkSelfPermission(MainActivity.this,
Manifest.permission.READ_EXTERNAL_STORAGE)
!= PackageManager.PERMISSION_GRANTED) {
‚Äč
ActivityCompat.requestPermissions(MainActivity.this,
new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},
PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);
} else {
// start image browsing
createImageBrowsingRequest();
}
Kotlin
// checking for image browsing permissions
if (ContextCompat.checkSelfPermission(this@MainActivity,
Manifest.permission.READ_EXTERNAL_STORAGE)
!= PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this@MainActivity,
arrayOf(Manifest.permission.READ_EXTERNAL_STORAGE),
PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE
} else {
// start image browsing
createImageBrowsingRequest()
}

In order to use NFC, you should include the following permission to the Android Manifest:

android.permission.NFC