oddmouse / cordova-plugin-locktask Goto Github PK
View Code? Open in Web Editor NEWA Cordova plugin for access to Android’s screen pinning APIs.
License: MIT License
A Cordova plugin for access to Android’s screen pinning APIs.
License: MIT License
Get the following message after running
cordova plugin add https://github.com/oddmouse/cordova-plugin-locktask.git
Error: Failed to fetch plugin https://github.com/oddmouse/cordova-plugin-locktask.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! cb() never called!
This method seems to be outdated. Do you have any update or a new method I can use
When I run the command adb shell dpm set-device-owner my.package/.MySubclass
I get the error
Error: Unknown admin: ComponentInfo{my.package/my.package.MySubclass}
Do you know what I'm doing wrong?
I made it working with the device admin mode to startlock without prompt.
but now my problem is. i can still get out of the screen pin with hold + pressing menu and back key. All I thought only stopLock can do that?
Hi,
I'm trying to use this plugin in a Cordova project. I'm not sure how set up it as the device owner (as explained in the device admin section. Can you give me some hint, maybe with a small example?
Thanks!
I've installed the plugin through Ionic and tried to run:
window.plugins.locktask.startLockTask(); but I'm getting:
"ionic.bundle.js:26794 TypeError: Cannot read property 'locktask' of undefined".
No idea why, I'm targeting API level 21. Could this be because of the Ionic 2 update?
I have been trying to use this plugin for a while now and everytime I use something new it doesn't work. The solution is to simply write LockTask.startLockTask(); in the javascript where you want to use it.
I'm trying to bypass screen lock confirm dialog. App is an owner now, but i got an error using window.plugins.locktask.startLockTask(null, null, DeviceAdminExample);
Uncaught ReferenceError: DeviceAdminExample is not defined
UPDATE:
Error found. DeviceAdminExample should be provided in quotes: 'DeviceAdminExample'
I'd like the ability to check whether or not my app is the Device Owner from this API. Would you be able to implement a new action for that?
In stopLockTask part, your example is :
window.plugins.locktask.startLockTask(successCallback, errorCallback);
I think it should be
window.plugins.locktask.stopLockTask(successCallback, errorCallback);
You have not specified under which license this project is released.
This way it cannot safely be reused by others.
Or am I missing something?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.