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
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:
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.
Hello kasito,
I forget the StartJS and EndJS action in my above code... are you try it with that actions?
Hello again,
Anyway this plugin has some problems to be propertly installed:
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.
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.
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)
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?
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
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!
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.