0
I want to run code that keeps the screen always lit, it already works perfectly when I am inside the APP, however, if I minimize or close it, stop working.
OBS: I am using Uikit.framework
code that keeps the screen lit:
[[UIApplication sharedApplication] setIdleTimerDisabled: YES];
How I could follow with it active even closing or minimizing the app?
I found this project on the internet:
https://github.com/muhku/FreeStreamer/tree/master/FreeStreamerMobile
It is a radio APP, when I play the radio and minimize the APP, it keeps playing. I want something like this, only instead of a Radio Streaming, I want to run the code shown above.
Have you tried putting this code in the method applicationDidBecomeActive:(Uiapplication *)application from your Appdelegate? This will force every time the app comes back, set the waiting time to disabled.
– Lucas Eduardo
Thank you Lucas, I’ll try this way and I’ll see you tomorrow if I made it or not :)
– CristianCotrena
@Lucaseduardo , as deactivating the waiting time?
– CristianCotrena
I posted an example in the question. In this example when I minimize the application, it keeps working.
– CristianCotrena