How to use Cordova plugins for compiled apps?

General questions about NeoAppBuilder - our rapid application development tool for building HTML5, web and mobile apps.

Moderator: Neosoft Support

Locked
otlik
Posts: 6
Joined: Fri Aug 17, 2018 1:44 am

How to use Cordova plugins for compiled apps?

Post by otlik » Wed Aug 29, 2018 3:25 am

Hello all!

Now I build a kiosk app to android devices, I want to hide navbar (statusbar hided succesfully with config.xml preference).

I add this plugin now to config.xml, but I dont know how can i activate it:
https://www.npmjs.com/package/cordova-plugin-fullscreen

Where should I paste the code like this:
AndroidFullScreen.immersiveMode(successFunction, errorFunction);

I also try to find solution for the screen no sleep. Can anyone write me a good solution for this?

Thanks!

Peter

User avatar
luishp
Posts: 410
Joined: Wed May 23, 2007 10:17 am
Location: Spain
Contact:

Re: How to use Cordova plugins for compiled apps?

Post by luishp » Wed Aug 29, 2018 4:13 am

Try to add your code in App Events->StartUp:

Code: Select all

BeginJS
AndroidFullScreen.immersiveMode(successFunction, errorFunction);
EndJS
Good luck!
Luis Hernández - SinLios Soluciones Digitales
http://sinlios.com

otlik
Posts: 6
Joined: Fri Aug 17, 2018 1:44 am

Re: How to use Cordova plugins for compiled apps?

Post by otlik » Wed Aug 29, 2018 4:35 am

Thanks your rapid answer, but It isn't work :( I try it with inserted plugin (phonegap builder insert plugin js to plugins folder automatically) and also tried it to load the js directly to the neoappbuilder. No luck.


Console:
jQuery.Deferred exception: 'AndroidFullScreen' not defined
'AndroidFullScreen' not defined (jquery.min.js, 2)

User avatar
luishp
Posts: 410
Joined: Wed May 23, 2007 10:17 am
Location: Spain
Contact:

Re: How to use Cordova plugins for compiled apps?

Post by luishp » Wed Aug 29, 2018 4:50 am

Sorry, I do not have much experience with Cordova plugins but, at first sight, it seems the appropiate JavaScript code has not been loaded.
Luis Hernández - SinLios Soluciones Digitales
http://sinlios.com

Locked