Does anyone know where the behavior of the iPhone/phonegap in the
locked state is documented? I mean the state when the user either
locks the screen by pressing the lock button or when he doesn't touch
the screen for a minute (or whatever is set in the settings).
The reason why I'm interested in that is because I've been coding an
app that has an "alarm" feature. As far as I understand, it is not
possible to fire an alert or do anything at all once the screen has
been locked. What would be perfect for my app is if this scenario
The user sets an "alarm time" of let's say 30 minutes, and then he
places his phone somewhere and doesn't touch it for 30 minutes. After
the 30 minutes, the phone plays an alarm file.
Unfortunately I have thus far only been able to fire the alarm if the
phone is set not to go into the lock state (which is bad for the
screen I suppose).
Any help is much appreciated.
OTOH, I don't know if phonegap apps can accept push notifications since I just now signed up and started playing with it.
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> For more options, visit this group at
> For more info on PhoneGap or to download the code go to www.phonegap.com
It's possible to disable the auto lock/dim using some Objective C.
All you have to do is change phonegapdelegate.m:
- (void)applicationDidFinishLaunching:(UIApplication *)application
You have to add:
[UIApplication sharedApplication].idleTimerDisabled = YES;
And it won't lock. :D
I am developing a cross mobile application that runs over iOS and Android.
So, I wanted to be attached to the power button in order to make some proccessing whenever a user presses the power button, and also I need to do some different proccesing when home button is pressed so I need I way to discriminate when home button was pressed and when lock/power button was pressed.
I was looking at phongegap docs without success so I found a way to solve that using native Android code but I couldnt find a way to do that on iOS.
Therefore if anyone knows any way to accomplish that using native iOS code just let me know!
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
For more options, visit this group at
For more info on PhoneGap or to download the code go to www.phonegap.com
To compile in the cloud, check out build.phonegap.com