Stop phonelock....?

0 favourites
  • 8 posts
From the Asset Store
Control your space ship in a weird space-time environment and destroy as many enemies as you can!
  • I have made an app which plays audio (ambient sound). I need to prevent the phone from locking so that the app stays open and screen on, (the screen is part of the ambience)

    is it possible?

    thanks all :)

  • I don't know if your are targeting Iphone but seems this behaviour must be specified by users/players in general "settings" and not by C2 dev ! ... so if a user want his phone to be locked after 3 minutes in all apps when doing nothing you must not prevent him to do so ! ;-p

    Of course some apps use direct access to mobile feature to do the job ...

    for example using this kind of code :

    [

    [UIApplication sharedApplication] setIdleTimerDisabled:YES];

  • I don't know if your are targeting Iphone but seems this behaviour must be specified by users/players in general "settings" and not by C2 dev ! ... so if a user want his phone to be locked after 3 minutes in all apps when doing nothing you can't prevent him to do so ! ;-p

    I'm talking about a droid but for iPhone that is not true, if you was to watch a movie on it or live tv with tvcatchup, it wouldn't lock regardless of settings, in my app, I have a few different frames that play along with audio, your not meant to touch just watch and listen, but the phone eventually locks :(. Really need a way to stop this or my app is kinda pointless.

  • Sorry you post too fast, i'm well known here to edit my post three times min before giving all details ;-p

    So using "only" C2 i think is not actually possible to do so ... but if you are exporting your project toward another product giving access to some native mobile feature like "phonegap" i think it could be possible.

  • I don't think this is currently possible, but Mozilla are working on standardising features to lock the screen to always on, so hopefully support will come in the near future.

  • Any updates on this? I'm also working on an app that needs the device always awake.

  • I second that - I have a countdown timer app that needs the phone to remain awake during that time frame. Any new info would be greatly appreciated.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm also looking for something to prevent the screen lock.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)