How to implement certain Cordova's plugin in my app


Guest

I found this plugins very useful

cordova plugin add https://github.com/sdkcarlos/cordova-ourcodeworld-preventscreenshots.git

I have installed it successful, but Executing it im have issues.

This is the javascript to be called.

So i created a Function in AB and pasted it as above then i called the Function by typing the function name in the page Show of the specific page i needed the action to be triggered .

Remember i just pasted the code in the function i created "PreventScreen"

Do i have to StartJS and EndJS for pasted script. Because it is not executing.

Please i will appreciate any clarification.

Thanks


DecSoft

Hello kasito,

You can't simply copy and paste Javascript code "as is", without understand where and what Javascript you must use. For example, the above code attach a function to be called when the device are ready, but App Builder already have an event named "Ready", which correspond with the event you try to use.

So try with this code in the app's Ready event:



Guest

Hi. David

I implemented as you suggested but it still didn't trigger. But im sure is an issue of implementation, i wish you try at your end and figure it for it out. The plugin seems to be useful for screen shot prevention.

Thanks.


DecSoft

Hello kasito,

I forget the StartJS and EndJS action in my above code... are you try it with that actions?



DecSoft

Hello again,

Anyway this plugin has some problems to be propertly installed:



Guest

Oh. Quite unfortunate at your end. I installed successfully, i will try with the StartJS and EndJS to see.

Thanks for the efforts. Though i downloaded it manually then copy and pasted the extracted folder to the plugin folder. Then during build, in installed automatically.

Im sure you cal figure that out if you have time.


DecSoft

Hello kasito,

You need the "StartJS" and "EndJS" actions without doubt, because you are try to use pure Javascript code. On the other hand, the installation error persists here: apparently there is a problem to download the plugin or they are not well configured or well formed, according to the error message we can see above.



Guest

Hi David

I got it working with the StartJS and EndJS. Although i have an issue with the app. When i launch the app and it becomes ready, the Javascript doesn't trigger, until i restore and maximize the app using android button before the Javascript (plugin) switch into action.

This im sure is the app issue because i have had similar problem with other apps i build without external Plugings.

How can thus be resolved? Script not triggering until you go to next page or you have to restore and maximize. The app interface (window)


DecSoft

Hello,

Hi David

I got it working with the StartJS and EndJS. Although i have an issue with the app. When i launch the app and it becomes ready, the Javascript doesn't trigger, until i restore and maximize the app using android button before the Javascript (plugin) switch into action.

This im sure is the app issue because i have had similar problem with other apps i build without external Plugings.

How can thus be resolved? Script not triggering until you go to next page or you have to restore and maximize. The app interface (window)

I think you must be more descriptive with the problem you have. What you expected? What you get? Where you place the Javascript that is "not triggered"? You get some error message? If you place other code (like an "Alert") in the same event are that code executed?



Guest

Hi David

I think it's because I made minify the app Cod. When i tried it with a new app without code minification it works perfect.

Thanks


DecSoft

Hello,

Hi David

I think it's because I made minify the app Cod. When i tried it with a new app without code minification it works perfect.

Thanks

Sorry, but something like that have non sense: the App Builder's minimizer tool can minimize the Javascript and CSS code, but DO NOT alter their behaviour in any manner!


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.