EddyVerbruggen / Insomnia-PhoneGap-Plugin

:sleepy: Prevent the screen of the mobile device from falling asleep
264 stars 106 forks source link

Some iOS devices/OS ignore the plugin #19

Closed davidluthiers closed 9 years ago

davidluthiers commented 9 years ago

Hi eddy. First of all I want to thank you for your work. Now, I have developed an app. There is a functionality where an audio is played and was required to prevent the screen from sleeping since that makes the sound stop. The thing is, the plug in works flawlessly in my android devices and my iPhone 4. The app has been purchased +700 times (very specific target audience) and I'm receiving some feedback about some iPhone devices still going to sleep. It's a low rate of failure (5-8% aprox) but it still bugs me. Do you have any clue of a solution here or what might be happening? I have no more ideas. Thank you eddy

EddyVerbruggen commented 9 years ago

Hi, I have no idea what may cause that - are you sure it's their screens locking automatically, or are they perhaps sending it to the background? It's hard to tell if it's a plugin issue, application code, or usage.

Perhaps you can try adding the Background Audio plugin to end your iOS troubles once and for all.

davidluthiers commented 9 years ago

Thank you for answering so fast! Sorry if I didn't give you enough details, it is not an application code error, I've checked it. The plugin it's called at the same time the audio is played. About the usage kind of issue I understand there are people who may be calling about it wrongly, because the app only keeps the screen awake while playing the audio and not if it's paused or stopped. But they don't send it to the background because there is some activity to do in the screen while the audio is being played (not a steady activity, but I don't think they minimize it to do other things).

So I thought it could be some new requirements of the newest iOS or hardcore power saving settings which overrides anything we can do.

Nevertheless I didn't knew there was a Background Audio Plugin! It can be a pretty good solution.

Thank you Eddy!

Ps: Sorry if my english it's not very good :p

EddyVerbruggen commented 9 years ago

No, to my knowledge nothing has changed since a long time in regards to this powersaving feature. People use it a lot and this is the first time I'm hearing about this - so I think your thoughts on how this goes wrong on the user level are correct.

Oh, and I like the fact that you're not constantly keeping the screen awake, I'm sure Apple appreciates it as well ;)