In order to get started with the Cloud Image Recognition Cordova Plugin for iOS and Android, we recommend you to run the examples included in the distribution that you can download upon request (see button above). The examples are located in the craftarsdkexamples directory as an Apache Cordova Project.
Our cordova plugins are published in the npm registry and can be installed through the cordova CLI. They are open-source and the code of the plugins can be in our bitbucket project for cordova.
The examples project for the Cloud Image Recognition Cordova Plugin for iOS and Android can be found in bitbucket.
To get the examples and add the plugin, open a terminal and run the following command:
1 2 3 4 5 6 7 8 9 10 11 12 |
$ git clone https://bitbucket.org/catchoom/craftar-cordova-examples-cloud-ir $ cd craftar-cordova-examples-cloud-ir ### First, install the platform(s) $ cordova platform add android $ cordova platform add ios ### Then, install the plugin $ cordova plugin add craftar-cordova-cloud-image-recognition ### Finally, run the examples app on your device, for instance: $ cordova run android --device |
The examples app opens a menu view that allows you to open the different examples. Each example opens the camera and the first step is for you to scan any object. We provide a set of reference images to point at that show different experiences. You can find those images in the folder craftarsdkexamples/Reference images.
We strongly recommend that you print this images out for testing. Pointing at them in your laptop/PC’s screen can heavily alter the experience due to artefacts that are invisible to your naked eye but very disturbing when captured with your smartphone.
If you want to add the plugin to your project, you just need to use the cordova CLI as follows:
1 2 |
$ cd your-cordova-project-path $ cordova plugin add craftar-cordova-cloud-image-recognition |
If you were already using an older version of our plugin, you need to first remove the plugin, then, add the new version:
1 2 3 |
$ cd your-cordova-project-path $ cordova plugin rm com.catchoom.craftar $ cordova plugin add craftar-cordova-cloud-image-recognition |
You may encounter some errors due to changes in the plugin’s API. We recommend that you review the class reference documentation if you can’t find the new methods/members.
In order to remove the plugin from your project, run the following commands:
1 2 |
$ cd your-cordova-project-path $ cordova plugin rm craftar-cordova-cloud-image-recognition |
The Cloud Image Recognition Cordova Plugin for iOS and Android is compatible with ionic through its Javascript interface. You can follow this tutorial to see how to use the plugin with ionic. Note that our plugin is not included in Ionic Native.
1 2 |
$ cd your-ionic-project-path $ cordova plugin add craftar-cordova-cloud-image-recognition |