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

First time running Integration ? #185

Closed zakblacki closed 4 years ago

zakblacki commented 4 years ago

Sorry for this probably stupid question but, I'm getting this when following instruction integration on new project

Cannot resolve symbol 'MY_REQUEST_CODE' Cannot resolve symbol 'mScanningOverlay'

Though I only need 'CustomCombinedSample' specifically 'Passeport and ID Combined' to display data Im still trying to figure out how all this works so If I could get in explanation like is it safe to delete the other module that aren't needed ?

SandraZiv commented 4 years ago

Hi,

MY_REQUEST_CODE is a variable that is used to identify from which Intent the result came in onActivityResult. You can define it as you wish. In our integration instruction, it is passed when starting activity ActivityRunner.startActivityForResult(this, MY_REQUEST_CODE, settings);. This is our helper method that simply creates new Intent and calls startActivityForResult method with provided parameters. More about this concept can be found in official Android documentation here.

Regarding mScanningOverlay, I assume you are referring to sample code here. If that is the case, there is a typo that we will fix as soon as possible, mScanningOverlay is actually mScanOverlay, so getScanningOverlay method should return that BlinkIdOverlayController created using createOverlay method.

In our sample apps from GitHub yes you can remove all modules that you don't need except LibUtils module because it contains some helper methods that are used in other modules.

Best regards, Sandra