on 05-19-2016 10:17 AM
Hey Guys,
i'm searching information how to call cordova plugins (e.g. Camera, Barcodescan) within a SAP-Fiori-App.
I would like to use it with the latest Version(1.6.3 Android) of SAP Fiori Client without the use of a Kapsel-Project.
As i understand, the Fiori-Client should provid this functionality...
Thank you for your answers
Best Regards
Thomas
Hi Thomas,
Take a look at help document.
Kapsel and Cordova Plugins for SAP Fiori Client - SAP Fiori Client - SAP Library
It guides you to cordova-plugin-camera
Regards,
Masa / SAP Technology RIG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your help! I get it working
Here my quick and dirty example code for the camera plugin. The variable imageURI contains the path to the picture on the device.
__________________________________________________________
sap.ui.define([
"sap/ui/demo/nav/controller/BaseController"
], function (BaseController) {
"use strict";
return BaseController.extend("sap.ui.demo.nav.controller.Home", {
onInit : function () {
var me = this;
navigator.camera.getPicture(me.onSuccess, me.onFail, { quality: 50,
destinationType: Camera.DestinationType.FILE_URI });
},
onSuccess: function(imageURI) {
alert(imageURI);
var image = document.getElementById('myImage');
image.src = imageURI;
},
onFail: function(message) {
alert('Failed because: ' + message);
}
});
});
For Barcode Scanning use this Link Barcode Scanner Samples - SAP Fiori Client - SAP Library
Regards Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.