IBM Worklight - Using the camera in BlackBerry

2019-03-04 00:16发布

I am developing an image-scanning application for BlackBerry. The application takes the user to a success page if the correct image is scanned and a failure page is shown on scanning an incorrect image.

I am using the IBM Worklight framework for developing this app.

My question is: How can I open camera for scanning in BlackBerry?

I have developed the same application for iOS using Worklight. In iOS I've used this JavaScript syntax:

WL.native.show(arg1, arg2, arg3);

So I want to know what will be the syntax for opening camera/native page in the case of BlackBerry.

1条回答
爷、活的狠高调
2楼-- · 2019-03-04 00:37

Just to make things clearer, you do not use WL.NativePage.show in order to use the camera in an iOS device. For that you use the Camera API provided by Apache Cordova.

WL.NativePage.show is meant to transition from a WebView to a native page.
You can, however, of course, use it to pass parameters and do whatever you want on the native side and then return to the WebView...

WL.NativePage.show is available only for iOS and Android.


Anyway,
In BlackBerry WebWorks apps (the type of BlackBerry apps supported in Worklight) you have several options:

Worklight currently supports Cordova 2.3 (in Worklight 5.0.6.x) and Cordova 2.6 (in Worklight 6.0).

查看更多
登录 后发表回答