regulaforensics / Xamarin-DocumentReader

.NET MAUI (formerly Xamarin) Framework for reading and validation of identification documents
https://regulaforensics.com
11 stars 7 forks source link

The sample tries to update the database online #2

Closed ezverev closed 5 years ago

ezverev commented 5 years ago

This instruction

DocumentReader.Instance().RunAutoUpdate(this, "Full", this);

Seems to launch a kind of online request which fails without internet connection. Would not it be better if you show how to load the database offline? Keep in mind you are telling to download the db.dat and include it into the app as an asset.

I tried to change the call with DocumentReader.Instance().PrepareDatabase(this, "Full", this);

but I still get the error:

Unable to resolve host \"software.regulaforensics.com\": No address associated with hostname

vyakimchik commented 5 years ago

There are 2 options of getting the database: 1) To download from the internet using PrepareDatabase or RunAutoUpdate (Android) and PrepareDatabaseWithDatabaseID or RunAutoUpdateWithDatabaseID (iOS) functions. 2) To download and include db.dat manually in the project.

More information about the ways of getting the database you can find here.

ezverev commented 5 years ago

When neither PrepareDatabase nor RunAutoUpdate are called, the next step accepting the regula.license gives an error db.dat not found regardless of the fact it is present in the Assets\Regula folder and is processed as AndroidAsset.

vyakimchik commented 5 years ago

Please, see email. I've sent you the additional information.