Code Monkey home page Code Monkey logo

blinkid-ui-android's Introduction

BlinkID UI for Android

Release

BlinkID UI is a library that lets you scan any BlinkID supported document without even knowing what a Recognizer is. It includes customisable scan activity and country selection activity.

To see it in action, check our demo app.

New to BlinkID? Take a look at BlinkID SDK first.

Quick Start

Add JitPack repository to your root build.gradle file

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Include BlinkID UI dependency in your app level build.gradle file

dependencies {
	implementation 'com.github.BlinkID:blinkid-ui-android:v4.9.1.0'
}

After doing a Gradle sync, you'll be able to start using BlinkID UI in your app

  • first make sure that your Microblink licence is correctly configured, check BlinkID documentation for more info
  • extend BaseDocumentScanActivity and implement required methods
    • getInitialDocument() - return the document that will be selected before the user has the chance to change it
    • shouldScanBothDocumentSides - most documents support scanning both front and back side, if you just want to scan one side, return false
    • createScanFlowListener() - this listener gets notified on scan flow updates, most importantly, you'll get final scan results in onEntireDocumentScanned method

If you want to customise scanning behavior and UI take a look at FAQ.

FAQ

How do I customise colors, icons and other resources?

To use your custom theme in scan activity, extend MbScanTheme and override attribues you want to change.

To use custom theme in country selection activity, extend either MbChooseCountryLightTheme or MbChooseCountryDarkTheme and override createDocumentChooser() in your scan activity to return your theme.

For other resources, name your resource the same as the resource you want to override in the library. For example, if you want to change torch icon, name you icon mb_ic_torch_on.

Check the sample app for examples of customisation.

How do I disable translations?

To disable translations for country names, override createLocalizationManager() and return your custom LocaleManager that limits languages to which to translate to.

If you want to disable translations for other strings, change your gradle configuration as explained here.

How do I disable scan sound or use a custom one?

In your scan activity, override createScanSuccessSoundPlayer() and return your own implementation. If you want to disable sound just return new EmptyScanSuccessPlayer().

How do I show a splash screen?

In your scan activity, override createSplashOverlaySettings() and return your own implementation.

How do I change scan timeout behavior?

In your scan activity, override createScanTimeoutHandler() and return your own implementation. If you just want to change timeout duration you can use DefaultScanTimeoutHandler.

How do I disable or change scan line animation?

In your scan activity, override createScanLineAnimator() and return your own implementation. If you want to disable the animation, just return new EmptyScanLineAnimator(). If you just want to change line color, provide mbScanIconScanLine attribute in your scan activity theme.

How do I limit selection to specific countries and document types?

In your scan activity, override createDocumentChooser() and return your own subclass of DefaultDocumentChooser, in which you'll override getCountryFilter() to return your desired filter and override isDocumentTypeSupportedForCountry() where you'll need to return whether a document type is supported for a specific country.

How do I use custom country selection activity?

In your scan activity, override createDocumentChooser() and return your own implementation. Start your country selection activity in onChooseCountryClick().

How can I get success frames?

In your scan activity, override getFrameGrabberMode() and return FrameGrabberMode.SUCCESS_FRAMES. Then override createFrameListener() and return listener that will handle success frames.

blinkid-ui-android's People

Contributors

matvidako avatar i1e avatar lokalise-bot avatar cerovec avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.