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
1
// checking for image browsing permissions
2
if (ContextCompat.checkSelfPermission(MainActivity.this,
3
Manifest.permission.READ_EXTERNAL_STORAGE)
4
!= PackageManager.PERMISSION_GRANTED) {
5
6
ActivityCompat.requestPermissions(MainActivity.this,
7
new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},
8
PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);
9
} else {
10
// start image browsing
11
createImageBrowsingRequest();
12
}
Copied!
1
// checking for image browsing permissions
2
if (ContextCompat.checkSelfPermission(this@MainActivity,
3
Manifest.permission.READ_EXTERNAL_STORAGE)
4
!= PackageManager.PERMISSION_GRANTED) {
5
6
ActivityCompat.requestPermissions(this@MainActivity,
7
arrayOf(Manifest.permission.READ_EXTERNAL_STORAGE),
8
PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE
9
} else {
10
// start image browsing
11
createImageBrowsingRequest()
12
}
Copied!
In order to use NFC, you should include the following permission to the Android Manifest:
1
android.permission.NFC
Copied!
Last modified 1yr ago
Copy link