Skip to content

Custom database doesn't work on Android #28

@feinstein

Description

@feinstein

The InitConfig class says:

/// Custom database binary.
///
/// Android only. For iOS use [databasePath].
ByteData? customDb;

But this code doesn't work:

final license = await rootBundle.load('assets/regula.license');
final initConfig = InitConfig(license);
initConfig.customDb = await rootBundle.load('assets/db.dat');
final (success, error) = await DocumentReader.instance.initializeReader(initConfig);

I can see that initConfig.customDb is not null, it has byte data there, but I get an initialisation error.

The docs say:

var config = InitConfig(license);

// iOS
config.databasePath = "db.dat";

// Android
//Place db.dat in the path below
var customDbPath = "/storage/emulated/0/Android/data/com.regula.documentreader/folder/";
config.databasePath = customDbPath;

Which conflicts with the source code.

So which approach is the correct one?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions