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 »

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 »

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 »

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 »

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