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

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

sadaf sadafian發表於
Number of replies: 1
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);


評比平均分數: -
In reply to sadaf sadafian

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

Dani Palou發表於
Core developers的相片 Moodle HQ的相片 Peer reviewers的相片 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