This question is locked. New answers and comments are not allowed.
I am currently trying to turn off sleep mode while an update is in progress. In order to accomplish this i am trying to use power management plugin with my telerik appbuilder windows client. I import the plugin in my app but it does not show up in other plugins section. Am i missing something? Is there another way to turn sleep mode on/off in all devices?
3 Answers, 1 is accepted
0
Craig
Top achievements
Rank 1
answered on 14 Oct 2014, 03:21 PM
Since no support answered you I hope this helps... I installed one plugin manually (not using Plugin Marketplace) and for my plugin it did show up in Other Plugins - see attached image. Only difference was the missing ON/OFF button which makes sense.
0
Hello guys,
The Other Plugins section in AppBuilder displays only the Telerik verified plugins and as the PowerManagement plugin is not one of them, it will not be displayed in the project properties. However, this does not mean that you cannot work with it. On the contrary, as long as you can see it successfully imported under the Plugins folder in your project, you can go ahead and utilize its functionality.
The plugin allows you to invoke the following methods:
I attached a sample project where the plugin is imported and the powerManagement.acquire() method is invoked as soon as the deviceready event fires. I tested the app on an iPhone 5C running iOS7.0.4 and it works as expected on my side.
Regards,
Tina Stancheva
Telerik
The Other Plugins section in AppBuilder displays only the Telerik verified plugins and as the PowerManagement plugin is not one of them, it will not be displayed in the project properties. However, this does not mean that you cannot work with it. On the contrary, as long as you can see it successfully imported under the Plugins folder in your project, you can go ahead and utilize its functionality.
The plugin allows you to invoke the following methods:
- powerManagement.acquire(onSuccess, onError,runLockScreen); - acquire a new wake-lock to keep device awake
- powerManagement.release(onSuccess, onError); - release the wake-lock
- powerManagement.dim(onSuccess, onError); - acquire a partial wake-lock, allowing the device to dim the screen
If you need any further information on how these methods work on each device, you can follow the links provided by the plugin author in its repository:
- for Android: PowerManager
- for iOS: idleTimerDisabled
- for WindowsPhone: UserIdleDetectionMode
I attached a sample project where the plugin is imported and the powerManagement.acquire() method is invoked as soon as the deviceready event fires. I tested the app on an iPhone 5C running iOS7.0.4 and it works as expected on my side.
Regards,
Tina Stancheva
Telerik
Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.
0
Jeferson
Top achievements
Rank 1
answered on 11 Jan 2018, 01:55 PM
Hello.
I would like to create an action where when the user presses the power button 4 times the device performs an action in my application hybridizes.
Is it possible to keep an active service even when the device restarts to keep my application always active in a hybrid application?
I would like to create an action where when the user presses the power button 4 times the device performs an action in my application hybridizes.
Is it possible to keep an active service even when the device restarts to keep my application always active in a hybrid application?