BlinkID / blinkid-android

Everything you need to add AI-driven ID scanning into your native Android app.
https://microblink.com/identity/identity-document-scanning/
438 stars 153 forks source link

Is overwriting lifecycle methods for a custom UI still necessary? #199

Closed Farbklex closed 4 years ago

Farbklex commented 4 years ago

In the readme you write under the section Custom UX with RecognizerRunnerView that we should overwrite our lifecycle methods.

Override your activity's onStart, onResume, onPause, onStop and onDestroy methods and call RecognizerRunnerView's lifecycle methods start, resume, pause, stop and destroy

Is this still true or can we instead use the setLifecycle method? It looks like it already takes care of calling the right lifecycle methods for us.

Using a lifecyle owner would prevent some lines of boilerplate code and should be included in the readme.

matvidako commented 4 years ago

Hi,

you are right, you can just use setLifecycle. Thanks for reporting it, we forgot to update readme after adding the new method.