Skip to main content

Xamarin is deprecated

This platform is deprecated and will not receive further updates or new features. Existing customers may continue to use and renew their license, while new projects should use .NET/MAUI, which is the recommended alternative.

View .NET/MAUI documentation

ProGuard | Xamarin Document Scanner

If you have ProGuard/R8 enabled for the release/production build, please make sure that Android SDK Tools package is installed inside your Android SDK Location and add the following rules:

For the Scanbot SDK for Xamarin

-keep public enum io.scanbot.sdk.barcode.entity.MSIPlesseyChecksumAlgorithm { *; }
-keep public enum io.scanbot.sdk.core.contourdetector.DetectionResult { *; }
-keep public enum io.scanbot.sdk.core.contourdetector.DetectionStatus { *; }
-keep public enum io.scanbot.check.model.CheckRecognizerStatus { *; }
-keep public enum io.scanbot.sdk.core.payformscanner.model.TokenType { *; }
-keep public enum io.scanbot.sdk.tiff.model.TIFFImageWriterCompressionOptions { *; }
-keep public enum io.scanbot.sdk.process.ImageFilterType { *; }

-keep public class io.scanbot.idcardscanner.IdScanResult { *; }
-keep class io.scanbot.genericdocument.entity.CommonFieldType { *; }
-keep class io.scanbot.genericdocument.entity.** { *; }
-keep class io.scanbot.genericdocument.** { *; }
-keep class androidx.appcompat.widget.FitWindowsLinearLayout { *; }
-keep class androidx.appcompat.widget.** { *; }
-keep class io.scanbot.barcodescanner.model.aamva.AAMVADocumentSubfile { *; }
-keep class io.scanbot.barcodescanner.model.** { *; }
-keep class io.scanbot.check.model.Result.** { *; }
-keep class io.scanbot.check.model.Result { *; }
-keep class io.scanbot.check.model.** { *; }

-keepattributes EnclosingMethod
-keepattributes InnerClasses
-keepattributes Signature
-keepattributes *Annotation*

-dontwarn sun.misc.**
-keep class com.google.gson.stream.** { *; }
-keep class * implements com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}

For the native Scanbot SDK

Since Scanbot SDK version 1.74.0, consumer ProGuard/R8 rules are integrated into the library and automatically applied to customers' modules.

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get free trial license