Block Notifications

I am looking for a way to block notifications from background apps. Is it possible in the Corona SDK? I can think of a few apps that do this, but I can’t seem to find a method for doing it. Specifically I need to keep audio from outside the app from being played while my app is running.

Any help would be appreciated.

I’m not aware of anything that can do that unless you’re Apple and they can do anything.  If you don’t do anything special, background music will stop when your Corona spp starts.  But I don’t know of a  way to stop other interrupt sounds like from push notifications, etc. other than the device owner turning them off.

Maybe I’m mistaken, but I don’t get notifications while in apps that play fulllscreen video… I will admit to being pretty much a noob concerning tablet / phone apps…  I was thinking / hoping there might be volume control over a system audio channel that handles notifications.

Apps playing video are doing it through an Apple SDK control. I’m pretty sure most apps just pass through to that.

Thanks for the info.

I found this in the ios developer library.

https://developer.apple.com/library/ios/#documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategories/AudioSessionCategories.html#//apple_ref/doc/uid/TP40007875-CH4-SW1

There appear to be several audio session categories that disallow audio from other applications.

I’m looking to see if there is something similar in android.

There seems to be some control in android using the audio manager… http://developer.android.com/reference/android/media/AudioManager.html#MODE_CURRENT

setStreamMute (STREAM_NOTIFICATION, true)
setStreamMute (STREAM_RING, true)
setStreamMute (STREAM_SYSTEM, true)

setStreamMute (STREAM_ALARM, true)

Is there a method to pipe down to the native os level and set these properties in corona?

I’ve asked the team and am waiting a response.  Engineering is pretty swamped right now.  It make take a few days to get a response.

Thanks.

I’m not aware of anything that can do that unless you’re Apple and they can do anything.  If you don’t do anything special, background music will stop when your Corona spp starts.  But I don’t know of a  way to stop other interrupt sounds like from push notifications, etc. other than the device owner turning them off.

Maybe I’m mistaken, but I don’t get notifications while in apps that play fulllscreen video… I will admit to being pretty much a noob concerning tablet / phone apps…  I was thinking / hoping there might be volume control over a system audio channel that handles notifications.

Apps playing video are doing it through an Apple SDK control. I’m pretty sure most apps just pass through to that.

Thanks for the info.

I found this in the ios developer library.

https://developer.apple.com/library/ios/#documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategories/AudioSessionCategories.html#//apple_ref/doc/uid/TP40007875-CH4-SW1

There appear to be several audio session categories that disallow audio from other applications.

I’m looking to see if there is something similar in android.

There seems to be some control in android using the audio manager… http://developer.android.com/reference/android/media/AudioManager.html#MODE_CURRENT

setStreamMute (STREAM_NOTIFICATION, true)
setStreamMute (STREAM_RING, true)
setStreamMute (STREAM_SYSTEM, true)

setStreamMute (STREAM_ALARM, true)

Is there a method to pipe down to the native os level and set these properties in corona?

I’ve asked the team and am waiting a response.  Engineering is pretty swamped right now.  It make take a few days to get a response.

Thanks.

Any updates?