Getting started
Sample Project
If you prefer sample projects over documentation, check out our samples on Github:
Docutain SDK Dependencies
The Docutain Xamarin SDK supports cross platform apps via Xamarin.Forms as well as native apps via Xamarin.Android and Xamarin.iOS. The packages are distributed via nuget.
- Xamarin.Forms
- Xamarin.Android
- Xamarin.iOS
For the Android platform, you need to pre install two Nuget packages first, in order to be able to install the Docutain SDK Nuget package.
Install Xamarin.AndroidX.LifeCycle.LiveData
with a version of at least 2.6.2.3
.
Install Xamarin.AndroidX.Core
with a version of at least 1.12.0.3
.
Once you have installed these two packages, install the nuget package Docutain.SDK.Xamarin.Forms
into all of your projects.
If you are developing a single platform Android app via Xamarin.Android, install the nuget package Docutain.SDK.Xamarin.Android
into your Android project.
If your Android project already has a version of Xamarin.Google.Android.Material installed that is lower than 1.4.0.6, you will get below build error. If this is the case, you need to install Xamarin.Google.Android.Material with a version of at least 1.4.0.6 in your Android project.
If you are developing a single platform iOS app via Xamarin.iOS, install the nuget package Docutain.SDK.Xamarin.iOS
into your iOS project.
Android Manifest
Camera Permission
If you want to use the Document Scanner, declare the following permission in your AndroidManifest.xml
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera"/>
Runtime permission for camera is handled automatically by the Docutain SDK.
Memory settings
Your application will work with high-resolution images. To avoid OutOfMemoryError exceptions it is highly recommended to set android:largeHeap="true"
in the <application>
element of your AndroidManifest.xml
file.
<application android:largeHeap="true" ...>
...
</application>
iOS Manifest
Camera Permission
If you want to use the document scanner, you need to specify the reason for requesting access to the camera as part of the NSCameraUsageDescription
in the Info.plist
. If you don't the app will crash.