on 03-19-2018 3:08 AM
Hello,
I've created an application, which scans BarCodes. When I add target URL of application directly to the SAP Fiori Client, everything works fine. Cordova plugins are available as I expected. When I add url of Fiori Launchpad to SAP Fiori Client and I run application from FLP, cordova is undefined. I found similar problem here, however there is mentioned that in that case I need to use window.parent.cordova. Problem is that window.parent.cordova is undefined as well. I am not using semantic object, only url to index.html of application. Could it be a reason that I don't see plugins? Is there any solution for a such situation?
I've tried add folder with plugins built by Hybrid Toolkit in SAP Web IDE to the project, with cordova.js file, and I added below line into index.html:
<scripttype="text/javascript"charset="utf-8"src="cordova.js"></script>
Then cordova plugins are available but after running scan nothing happens. I suppose it is because event deviceready doesn't fire at all:
document.addEventListener("deviceready", onDeviceReady, false);
Thanks in advance for your help.
Regards
Cordova plugins will work only in a Mobile Device and will not run in a PC's Browser.
Either you have to run your app in Fiori Client in a mobile device or an emulator (in a PC).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
26 | |
9 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.