Skip to Content
avatar image
Former Member

Cordova is undefined, SAP Fiori Client, Fiori Launchpad


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.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Mar 22, 2018 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).

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

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