Has anybody got the camera api working on service portal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2017 08:18 AM
I'am planning to use the barcode widget for one of my portal page. Has anybody got the "cabrillo.camera.getBarcode()" api working?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2017 10:03 AM
Hello Swarup,
I have personally not have used it yet. Here is a thread that may be of help Service Portal - barcode scanning
Cheers,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2017 09:22 PM
We're currently working on official Cabrillo documentation. Here is an example of the getBarcode() API. Please note that this is not official documentation. https://gist.github.com/wlisac/6122145d473b998f3748089982fa70fe
Also, Cabrillo JS APIs are only supported when executing in ServiceNow's native mobile apps. You should use cabrillo.isNative(); to determine if Cabrillo is executing in a native context.
Cabrillo is explicitly unavailable from GlideForm client scripts.
Thanks,
Will
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2017 09:24 PM
Also — make sure Cabrillo is available in your widget script. Cabrillo JS is easily available in AngularJS as an injectable parameter. For example, you can inject Cabrillo inside of a Service Portal widget's client script.
function(cabrillo) {
var c = this;
// Used to determine if Cabrillo is executing in ServiceNow's native mobile apps.
c.isNative = cabrillo.isNative();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 05:21 AM
Thanks Will. The information really helpful.
My requirement was to get this thing working on ipad device to capture images while submitting an incident and i got it working through the native servicenow app (on service portal / ticket conversation widget). The attachment widget detects device and gives option to open camera and click.
Regards,
Swarup Roy