i want use a cordova plugin only for my own moodle plugin.

i want use a cordova plugin only for my own moodle plugin.

by sadaf sadafian -
Number of replies: 1
Picture of Plugin developers

Hello

i use:

https://snyk.io/advisor/npm-package/cordova-plugin-prevent-screenshot

to prevent screen record or take a screenshot in the android app. it work correctly but on all of moodle mobile app it is implement. i want use that only on my own moodle plugin.

i put :

window.plugins.preventscreenshot.disable(successCallback, errorCallback);


in the src/app/app.component.ts

and it is work. it prevent user to take screenshot. but i want it is limited in my own moodle plugin. is it possible use in the mobile.php to prevent take screen in my own moodle plugin in the moodle mobile app. i want don't modify core of moodle mobile app. i use :

window.plugins.preventscreenshot.disable(successCallback, errorCallback);

in the mobile.php of my moodle plugin but the mobile side of plugin corrupted. 

simplified of my problem:

how to use this code in moodle plugin?:

window.plugins.preventscreenshot.disable(successCallback, errorCallback);


Average of ratings: -
In reply to sadaf sadafian

Re: i want use a cordova plugin only for my own moodle plugin.

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers

Hi sadaf,

unfortunately, Moodle plugins cannot add new Cordova plugins to the app so it's not possible to achieve what you want. We don't have plans to add that Cordova plugin in the app.

Kind regards,

Dani