Get Started         Best Practices         Developer Guide         FAQ        
Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Ionic 2 + Angular 2 + CraftAR SDK

Mark Redfern Aug 14, 2017

Hi guys, I am new to both CraftAR as well as angular 2 ( typescript ) and was wondering if anyone had any pointers for me with regards to implementing the sdk in my application. I have added the sdk as a plugin using the CLI, but I am having trouble registering the module in order to use it. I must admit I am very green in this area, so any help is welcome.

I have tried the following

import { CraftARSDK } from 'com.catchoom.craftar';

and then i simply get a "cannot find module" error

Any help would be greatly appreciated


( Agent )
Luis Martinell

Aug 18, 2017

Hi,

We haven’t tested the SDK with ionic/angular and it’s not designed to integrate directly using “import …”.

Can you test the examples app provided with the SDK and see if you can adapt it ?

Best regards,
Luis

0 rated
PAD

Sep 10, 2017

Hi,

+1 with Mark, it would be great if you designed an Ionic2/3 SDK :)

PAD
0 rated
( Agent )
Luis Martinell

Sep 14, 2017

Hi there,

We are working on a new version of our cordova plugins right now. We will test this and make any changes if necessary to give better support for other tools using Cordova underneath.

We checked our plugin, anyway and our javascript modules comply with the Cordova requirements for 3rd party plugins. I read also that 3rd party cordova plugins can be used with Ionic so, even if we don’t offer the fancy “import module” syntax, you should be able to use our plugin.

best regards,
Luis

0 rated
Tom

Mar 21, 2019

Is there a new version of the cordova SDK available?
Because I'm not able to run the on device cordova examples on bitbucket (2017).
Once I select "finder mode", the app just crashes. (android 7.1)
0 rated
Tom

Mar 21, 2019

This is the error output:
2019-03-21 18:24:16.785 24974-25029/com.catchoom.test E/chromium: [ERROR:devtools_http_handler.cc(292)] Cannot start http server for devtools. Stop devtools.
2019-03-21 18:24:16.806 24974-25031/com.catchoom.test E/libEGL: validate_display:99 error 3008 (EGL_BAD_DISPLAY)
2019-03-21 18:24:17.703 24974-25032/com.catchoom.test E/chromium: [ERROR:budget_service.cc(160)] Unable to connect to the Mojo BudgetService.
2019-03-21 18:26:11.196 24974-24974/com.catchoom.test E/BoostFramework: BoostFramework() : Exception_1 = java.lang.ClassNotFoundException: Didn't find class "com.qualcomm.qti.Performance" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib, /vendor/lib]]
0 rated
Tom

Mar 21, 2019

And this is the error that crashes the app:

2019-03-21 18:53:30.004 24974-11151/com.catchoom.test E/CraftAR On-Device Image Recognition SDK 1.4.5: Camera params can only be set when capture is running.
2019-03-21 18:53:30.059 24974-24974/com.catchoom.test E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.catchoom.test, PID: 24974
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.catchoom.craftar.CraftARPlugin.onCameraOpenFailed()' on a null object reference
at com.catchoom.craftar.CraftARCordovaActivity.onCameraOpenFailed(CraftARCordovaActivity.java:80)
at com.craftar.CraftARActivity$MyRGBAVideoCaptureConsumer$2.run(CraftARActivity.java:194)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6128)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
1 rated
( Agent )
Luis Martinell

Mar 22, 2019

Hi,

This usually happens when the camera device is blocked. It happens from time to time in some devices and the only way to solve it is to reboot the device.

Best,
Luis

0 rated

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Couldn't find what you were looking for?

support@catchoom.com
https://cdn.desk.com/
false
catchoom
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete