blinkid-cordova icon indicating copy to clipboard operation
blinkid-cordova copied to clipboard

Add BlinkID to an existing ionic project example

Open ziyadsfaxi opened this issue 6 years ago • 6 comments

Hello,

I't would really be helpful if there is an example on how to add BlinkID to an existing ionic project.

Thank you.

ziyadsfaxi avatar Mar 21 '18 21:03 ziyadsfaxi

Need this, is there anyone that can help us on this?

adityapurwa avatar Apr 12 '18 19:04 adityapurwa

Hello,

Our main focus is on software development. We support numerous cross platforms but we are not activly working on them. Can you please let us know where exactly the problem is and maybe someone from our development team can help.

Regards

culoi avatar Apr 12 '18 19:04 culoi

The example provided within this repository is not standard to the usual Ionic steps and guides to add a platform, thus making it confusing to people who were used on how usually we add an Ionic native plugins. Also, there is no ionic-native wrapper that we can include to NgModule, the example is editing the index.html straight away and not putting it inside any typescript file or angular components.

I think we will understand better if it is more thoroughly documented and follow Ionic standards on plugin installation.

adityapurwa avatar Apr 12 '18 20:04 adityapurwa

Hello @adityapurwa , this is how you can Integrate BlinkID to an existing ionic app:

  1. add the BlinkID cordova plugin: cordova plugin add blinkid-cordova.
  2. declare cordova's variable to use it's plugins:
import { Component } from '@angular/core';
declare var cordova;
@Component({...})
export class HomePage {...}

Note: you don't have to add it to app.module, you can just use it directly.

  1. Make sure you set blinkID's configurations correctly:
var types = ["USDL", "MRTD", "Barcode"];
var imageTypes = ["IMAGE_SUCCESSFUL_SCAN", "IMAGE_FACE", "IMAGE_DOCUMENT"];
var language = "en";
var licenseiOs = "<your iOS license>";
var licenseAndroid = "<your Android license>";
  1. then you can follow the decontamination:
 cordova.plugins.blinkIdScanner.scan(...)

Notice the cordova variable that we declared in the second step.

ziyadsfaxi avatar Apr 20 '18 12:04 ziyadsfaxi

Hello @zizo95, could you provide the entire code source for this? i am really stucked on this issue now, please it would help if you can explain more.

patriciachrysy avatar Aug 07 '18 09:08 patriciachrysy

Hi @zizo95, @adityapurwa, @patriciachrysy,

Sorry for not following up on this. We did add the ionic sample project, as you can see here: https://github.com/BlinkID/blinkid-cordova/blob/master/initIonicDemoApp.sh

We hope this helps. Let us know if you have any other issues.

Cerovec avatar Mar 26 '20 19:03 Cerovec