File tree 4 files changed +20
-7
lines changed
4 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 1
1
.idea
2
- .vscode
2
+ .vscode
3
+ node_modules
Original file line number Diff line number Diff line change 1
1
# NativeScript Insomnia
2
2
3
+ [ ![ NPM version] [ npm-image ]] [ npm-url ]
4
+ [ ![ Downloads] [ downloads-image ]] [ npm-url ]
5
+ [ ![ Twitter Follow] [ twitter-image ]] [ twitter-url ]
6
+
7
+ [ npm-image ] :http://img.shields.io/npm/v/nativescript-insomnia.svg
8
+ [ npm-url ] :https://npmjs.org/package/nativescript-insomnia
9
+ [ downloads-image ] :http://img.shields.io/npm/dm/nativescript-insomnia.svg
10
+ [ twitter-image ] :https://img.shields.io/twitter/follow/eddyverbruggen.svg?style=social&label=Follow%20me
11
+ [ twitter-url ] :https://twitter.com/eddyverbruggen
12
+
3
13
## Demo app (Angular)
4
14
This plugin is part of the [ plugin showcase app] ( https://github.com/EddyVerbruggen/nativescript-pluginshowcase/tree/master/app/ar ) I built using Angular.
5
15
Original file line number Diff line number Diff line change 1
- var utils = require ( "tns-core-modules/utils/utils" ) ;
2
-
3
1
exports . keepAwake = function ( ) {
4
2
return new Promise ( function ( resolve , reject ) {
5
3
try {
6
- var app = utils . ios . getter ( UIApplication , UIApplication . sharedApplication ) ;
4
+ var app = UIApplication . sharedApplication ;
7
5
if ( ! app . idleTimerDisabled ) {
8
6
app . idleTimerDisabled = true ;
9
7
}
@@ -18,7 +16,7 @@ exports.keepAwake = function () {
18
16
exports . allowSleepAgain = function ( ) {
19
17
return new Promise ( function ( resolve , reject ) {
20
18
try {
21
- var app = utils . ios . getter ( UIApplication , UIApplication . sharedApplication ) ;
19
+ var app = UIApplication . sharedApplication ;
22
20
if ( app . idleTimerDisabled ) {
23
21
app . idleTimerDisabled = false ;
24
22
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " nativescript-insomnia" ,
3
- "version" : " 1.2.2 " ,
3
+ "version" : " 1.2.3 " ,
4
4
"description" : " Make the screen not dim (and eventually lock the device) while Insomnia is active" ,
5
5
"main" : " insomnia" ,
6
6
"typings" : " index.d.ts" ,
25
25
"author" :
" Eddy Verbruggen <[email protected] > (https://github.com/EddyVerbruggen)" ,
26
26
"license" : " MIT" ,
27
27
"bugs" : " https://github.com/eddyverbruggen/nativescript-insomnia/issues" ,
28
- "homepage" : " https://github.com/eddyverbruggen/nativescript-insomnia"
28
+ "homepage" : " https://github.com/eddyverbruggen/nativescript-insomnia" ,
29
+ "devDependencies" : {
30
+ "tns-core-modules" : " ~5.4.2" ,
31
+ "tns-platform-declarations" : " ~5.4.2"
32
+ }
29
33
}
You can’t perform that action at this time.
0 commit comments