Page 1 of 1
Does the mobileLockIdleTimer command work
Posted: Tue Jul 31, 2012 12:15 pm
by Simon Knight
Hi,
The command
does not prevent the screen and device from going to sleep in an app I writing, has anyone else managed to get it working? Are there some hidden setting within Android that I need to make?
The comments in the dictionary
Comments:
Locking the idle timer increments an internal lock count, while unlocking the idle timer decrements the lock count. When the lock count goes from 0 to 1, the idleTimer is turned off; when the lock count goes from 1 to 0, the idleTimer is turned on.
could be read as using the command in a loop along with the unlock command.
Re: Does the mobileLockIdleTimer command work
Posted: Tue Jul 31, 2012 12:26 pm
by Simon Knight
Hi I have tried the following code:
Code: Select all
on mouseUp
if the environment is not "mobile" then
answer " This application is only able to run on an Android device equipped with GPS."
else
mobileLockIdleTimer
if mobileIdleTimerLocked() is true then
answer "Timer is locked"
else
answer "The Timer is not locked"
end if
RingMaster
end if
end mouseUp
And it reports "The timer is not locked"
Re: Does the mobileLockIdleTimer command work
Posted: Tue Jul 31, 2012 11:56 pm
by Dixie
Simon...
The 'iphoneLockIdleTimer', 'iphoneUnlockIdleTimer' do work... I have used them... I've attached a stack with which I have just tested them again before I posted...
be well
Dixie
Re: Does the mobileLockIdleTimer command work
Posted: Wed Aug 01, 2012 5:44 am
by Simon Knight
Dixie,
Thanks for the demo stack. It does not work on Android but then why would iphone commands. I tried substituting Android and Mobile but no joy and I have ticked the idle timer option in the build settings.
Thanks for trying
Simon
Re: Does the mobileLockIdleTimer command work
Posted: Thu Aug 02, 2012 11:28 am
by Simon Knight
I have submitted a bug report (No.10361) and it has been confirmed as a fault.
Re: Does the mobileLockIdleTimer command work
Posted: Thu Feb 05, 2015 11:19 pm
by guucidan
I struggled with this for a while. It turned out that I had not turned on the option in Android Settings. File/Stand Alone Application Settings/Android - check the "Application Permissions" option Idle Timer.
Worked perfectly after that.
Thanks
Re: Does the mobileLockIdleTimer command work
Posted: Fri Feb 06, 2015 11:35 am
by Simon Knight
Thanks - I will have a look if I am able to locate my old code.
Simon