Skip to Content

Cordova is undefined, SAP Fiori Client, Fiori Launchpad

Mar 19 at 03:08 AM


avatar image


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:


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.


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Kiran Jakkaraju Mar 22 at 06:28 PM

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).

Show 1 Share
10 |10000 characters needed characters left characters exceeded

I wrote that I run it from SAP Fiori Client - It is mobile application, so I execute it on mobile device.