BlinkID / blinkid-cordova

ID scanning for cross-platform apps built with Cordova and Phonegap.
48 stars 34 forks source link

Add BlinkID to an existing ionic project example #48

Open ziyadsfaxi opened 6 years ago

ziyadsfaxi commented 6 years ago

Hello,

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

Thank you.

adityapurwa commented 6 years ago

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

culoi commented 6 years ago

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

adityapurwa commented 6 years ago

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.

ziyadsfaxi commented 6 years ago

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.

  3. 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>";
  4. then you can follow the decontamination:

    cordova.plugins.blinkIdScanner.scan(...)

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

patriciachrysy commented 5 years ago

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.

Cerovec commented 4 years ago

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.