Skip to main content
esecharli
Participant
Sep 27, 2016 9:04 AM UTC
Question

Proximity Sensor stops playing audio

Hi,

I develop an app that plays audio while doing some other things with sensors, because the background mode to play audio its restrict to only play audio i tell the user to put the device in his pocket in order to mantain sensors access when the screens go off, but if i activate proximity sensor using an extension (using proximityMonitoringEnabled), the audio stops playing when the screen turns off.

I develop a similar app years ago an the behavoir its not like that, when the screen turns off the audio stills plays.

Am i missing something in the code?

Thanks in advance

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

esecharli
esecharliAuthor
Participant
Sep 28, 2016 8:28 AM UTC

I create a sample project with an extension to activate proximity sensor and a sound beeping, if you press the power off button beep stills plays, but if you put your hand in front the proximity sensor, the screen goes off, the sounds stops, i think that the swf movie stop playing or something

https://www.dropbox.com/s/rs5oeda52s3lsyj/_appTest.zip?dl=0

I made an app in Oct 2013, and when proximity sensor turns off the screen the audio stills plays and have full to all the phone so something changed, but i dont know what

Translate
deesharm
Adobe Employee
Adobe Employee
Sep 27, 2016 12:08 PM UTC

Hi Carlos,

Have you tried giving below tags under <InfoAdditions> tag in app.xml file:

<key>UIBackgroundModes</key>

  <array>

                <string>audio</string>

  </array>

Let us know if it helps you.

Thanks,

Adobe AIR Team

Translate
esecharli
esecharliAuthor
Participant
Sep 27, 2016 12:24 PM UTC

Yes, i try putting this one, and the audio plays if i press the home button or power button, but stops if the screen goes off due to proximity sensor behaviour

Translate