How to save a mobile screen on

I am working on a Meteor application that has been running for a long time, and I am looking for a way to save the screen when there is no user activity (while the application is running, of course).

thanks

+5
source share
1 answer

If I read the documentation correctly, and I cannot, because I have never used this before, then you can add a plug-in for insomnia for your cord / telephone prefab:

$ meteor add cordova: nl.x-services.plugins.insomnia@https ://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin/tarball/47ba15a4ad791eb4d5a0643cdb7ef69f73109e15 

And then use:

 window.plugins.insomnia.keepAwake() 

and

 window.plugins.insomnia.allowSleepAgain() 

Update for Meteor 1.2 :

Install plugins with Git URLs: Meteor no longer supports installing Cordoba plugins from tarball URLs, but supports GitURL addresses with a SHA link (e.g. https://github.com/apache/cordova-plugin-file#c452f1a67f41cb1165c92555f0e721fbb07329cc ). Existing GitHub tar file URLs are automatically converted.

This means that now you need to use:

 $ meteor add cordova: nl.x-services.plugins.insomnia@https ://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin#47ba15a4ad791eb4d5a0643cdb7ef69f73109e15 

Update 2

As user3819370 points out, the plugin is now in the registry used by the meteorite, so you can simply install it as follows:

 meteor add cordova: cordova-plugin-insomnia@4.0.1 
+7
source

All Articles