Document Import Guide
When activating this feature, you have the ability to indicate the types of documents that the user can choose from, only images, only PDF files, or both images and PDF files. To enable it, pass a DocumentImportEnabledFileTypes
enum value to GiniBank.setCaptureConfiguration(CaptureConfiguration(documentImportEnabledFileTypes = ))
.
Android Manifest
Declare the READ_EXTERNAL_STORAGE
permission in your app’s AndroidManifest.xml
:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="...">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
</manifest>
When targeting Android 13 and later, also declare the READ_MEDIA_IMAGES
permission:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="...">
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
</manifest>
If the permission isn’t granted, Gini Bank SDK prompts the user to grant the permission when they use the document import feature.
Declare that your app queries for apps can handle intents to pick or open images and PDF files. For more information, see Package visibility filtering introduced in Android 11.
<queries>
<intent>
<action android:name="android.intent.action.PICK" />
<data android:mimeType="image/*" />
</intent>
<intent>
<action android:name="android.intent.action.OPEN_DOCUMENT" />
<data android:mimeType="image/*" />
</intent>
<intent>
<action android:name="android.intent.action.OPEN_DOCUMENT" />
<data android:mimeType="application/pdf" />
</intent>
</queries>