blob: 034d17119a13a1dc1a8ac73d112c4860dace63b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
using Microsoft.Phone.Shell;
namespace WPCordovaClassLib.Cordova.Commands
{
public class Insomnia : BaseCommand
{
public void keepAwake(string options)
{
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
DispatchCommandResult(new PluginResult(PluginResult.Status.OK));
}
public void allowSleepAgain(string options)
{
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Enabled;
DispatchCommandResult(new PluginResult(PluginResult.Status.OK));
}
}
}
|