Skip to main content

Getting started

Sample Project

If you prefer sample projects over documentation, check out our Docutain SDK .NET MAUI Sample on Github.

Supported TargetFrameworks

A default MAUI application contains 4 target frameworks for Android, iOS, MacCatalyst and Windows.

Maui default target frameworks

The Docutain SDK for MAUI only supports Android and iOS. So in order to use the Docutain SDK, you need to remove MacCatalyst and Windows from your list of target frameworks.

Maui supported target frameworks

Docutain SDK Dependencies

.NET 7 Android Prerequisites

If your project is based on .NET 7, you need to add the following to your project file in order to be able to install the Docutain SDK into the Android part of your project:

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0-android'">
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.6.2.3" />
</ItemGroup>

Install Nuget Package

The Docutain SDK for .NET MAUI is distributed through nuget.org. You’ll find the package in your development environment by searching for Docutain.SDK.MAUI.

Install the nuget package into your project.

NuGet package

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"/>
info

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.


NSCameraUsageDescription