0

I am working on a cordova project and I want to use the plugin locktask provided by cordova itself to pin an android app. I could use other plugins successfully but this plugin does not work for some reason.

Another solution could be implementing the startlocktask() method using the native java class but I still didn't know how to invoke this method into the javascript code

After addding the cordova plugin using cordova plugin add cordova-plugin-locktask a plugin file is downloaded. However, when I use this line in the javascript, it deosn't work window.plugins.locktask.startLockTask();

P.S. there is a java function StartLockTask() that would solve the problem but I do not know how to invoke a java function inside the javascript code

4

1 回答 1

0

我认为答案是添加插件 cordova-plugin-locktask 并使用方法 LockTask.startLockTask(); 在 JavaScript

于 2017-06-15T10:03:52.450 回答