Thank you
$meteor add cordova :nl.x-services.plugins.insomnia@https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin/tarball/47ba15a4ad791eb4d5a0643cdb7ef69f73109e15
Then use:
window.plugins.insomnia.keepAwake()
and
window.plugins.insomnia.allowSleepAgain()
Meteor 1.2 update:
Install plugins from a Git URL: Meteor no longer supports installing Cordova plugins from tarball URLs, but does support Git
URLs with a SHA reference (like
07003).
Existing GitHub tarball URLs are converted automatically.
This means you now need to use:
$meteor add cordova:nl.x-services.plugi ns.insomnia@https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin#47ba15a4ad791eb4d5a0643cdb7ef69f73109e15
Update 2
As user3819370 pointed out, the plugin is now located in the meteor used Registry, so you can install it like this:
meteor add cordova:[email protected]
I am working on a Meteor application that runs for a long time, and I am looking for a way to keep the screen when there is no user activity (of course the application is running).
Thank you
If I read the documentation correctly, and I may not have, because I have never used this before, then you can add the insomnia plugin to your In the cordova / phonegap version, it is as follows:
$meteor add cordova:nl.x-services.plugins.insomnia@https://github.com/ EddyVerbruggen/Insomnia-PhoneGap-Plugin/tarball/47ba15a4ad791eb4d5a0643cdb7ef69f73109e15
Then use:
window.plugins.insomnia.keepAwake()
and
window.plugins.insomnia.allowSleepAgain()
Meteor 1.2 update:
Install plugins from a Git URL: Meteor no longer supports installing Cordova plugins from tarball URLs, but does support Git
URLs with a SHA refe rence (like
07003).
Existing GitHub tarball URLs are converted automatically.
This means you now need to use:
$meteor add cordova:nl.x-services.plugins.insomnia@https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin#47ba15a4ad791eb4d5a0643cdb7ef69f73109e15
Update 2
As user3819370 pointed out, the plugin is now in the registry used by meteor, so you can install it like this:
meteor add cordova:cordova-plugin-insomnia@ 4.0.1