cancel
Showing results for 
Search instead for 
Did you mean: 

Custom javascript calls in Fiori Launchpad

jprovost
Explorer
0 Kudos

Greetings scn folks,

I'm pretty much new to this whole SAP/SAPUI5/Fiori world and I have to implement a barcode scanner that will be used as an extra input device for some Fiori apps. The device comes with a plugin that can be initialized via javascript calls. I'm looking for a way to implement those calls + callbacks into the Fiori launchpad shell, so that the device can be used in every Fiori apps without having to add extra code in each one of them.

Is this something that can be achieved or am I daydreaming?

I'm currently exploring in SAP WEB IDE, created an extension project for flpportal but really not excited of where this is going yet...

Any help welcome!

Thanks

View Entire Topic
junwu
Active Contributor
0 Kudos

just make it as lib and deploy to your server, you can use it where it is needed.

putting it in launchpad doesn't mean it can be used in every app

jprovost
Explorer
0 Kudos

I thought libraries were meant for UI controls... All I need is a central point where to put some lines of javascript that have nothing to do with UI. Turning the scanning device on and redefining scanning callbacks is what I want to do.

Also worth mentionning, the scanner device is a iPod 'sleeve', and the said plugin has been integrated with the fioriClient on the iPod. This makes the plugin class accessible from the apps in the fioriClient's launchpad (already tested). So yes, I thought if there was some way to lay that javascript somewhere in the launchpad, any app launched from it would recognize the callbacks, why wouldn't they?

junwu
Active Contributor
0 Kudos

lib can be anything...

you just call it, why it has to sit in launchpad.....

sap.ui.define(["yourscannerjs", 

that's right? i believe it will be loaded once, no matter how many app are using it in launchpad case, i could be wrong.

jprovost
Explorer
0 Kudos

I want the code to be called before any app is launched. Let's say it's legit to put my javascript in a library, where do I include it and run the code inside before opening the fiori apps if not in the launchpad?

junwu
Active Contributor