Media Volume Android

When I build my app for android, and I want to turn the volume lower in the game. Instead of lowering the media volume it will lower the normal volume. The volume of my game doesnt respond to this

But any other apps/games always lower the media volume, when i lower my volume inside this apps/games.

Do I have to change something in my code to make this possible? Or is it a bug in my Corona (cause im still using the trial version)??

EDIT: another small question:
When playing my game it is not needed to touch the screen all the time which makes the screen turn dark after a while. Can I make the screen stay awake or something like that?

thanks in advance [import]uid: 118839 topic_id: 24692 reply_id: 324692[/import]

*bump*

Anyone know this? [import]uid: 118839 topic_id: 24692 reply_id: 100592[/import]

I don’t think Corona interacts with the hardware volume buttons in that way. Actually, I don’t even think you can interact with them at all to mimic this. Corona’s volume control is software only at the moment.

Concerning the dimming. This can be disabled using the system.setIdleTimer setting.

Read about that here http://developer.anscamobile.com/reference/index/systemsetidletimer [import]uid: 56820 topic_id: 24692 reply_id: 100613[/import]

I think it should be possible to turn down your media volume when your in a game instead of the call volume. Cause right now it is turning down the call volume, when i try to turn down the volume in-game with my hardware volume buttons. Any other app does turn down media volume instead of call volume…

Concerning the dimming, thanks alot! :slight_smile: [import]uid: 118839 topic_id: 24692 reply_id: 100781[/import]

Any news on how to get the volume buttons to change media and not call volume? [import]uid: 92709 topic_id: 24692 reply_id: 135773[/import]

I’m not sure I understand.

Pressing the device’s volume up/down button does raise/lower the volume in a Corona app. I’ve confirmed this. Also, a Corona made app binds its audio to the media stream, just like other apps as well.

Perhaps you are overriding the volume keys in your app by mistake? Have you set up a key listener in your code and is it returning true for all keys? If so, then that would override Android’s default handling of the volume keys… as well as other keys.

Or perhaps you are referring to controlling the volume via our [lua]audio.setVolume()[/lua] function? In that case, that function only controls the volume of sounds played via the [lua]audio[/lua] API and not the [lua]media[/lua] API.
[import]uid: 32256 topic_id: 24692 reply_id: 135786[/import]

My listener returns the right values and the same happens even when I disable the listener. This worked before as I had the media volume changing properly. I still have an old build where it works correctly.

It seems to have changed since I started to use the media API due to the android sound lag. I’m using the latest public build 2012.971 and a Samsung Glaxy S3. [import]uid: 92709 topic_id: 24692 reply_id: 135791[/import]

One thing we noticed was that modifying the volume before a sound was played would modify the ringer volume. Our quick-but-effective workaround was to play a short audio track at 0 volume on App Start to force the Audio system to kick in and let our volume buttons affect the Media volume right from the app start. [import]uid: 134101 topic_id: 24692 reply_id: 135796[/import]

I verified this is an issue on two devices I tested: Galaxy SII and SIII. This was verified with our EventSound sample app that uses media.playEventSound. I filed a bug report, #19689, for this issue. [import]uid: 7559 topic_id: 24692 reply_id: 135832[/import]

Any news on how to get the volume buttons to change media and not call volume? [import]uid: 92709 topic_id: 24692 reply_id: 135773[/import]

I’m not sure I understand.

Pressing the device’s volume up/down button does raise/lower the volume in a Corona app. I’ve confirmed this. Also, a Corona made app binds its audio to the media stream, just like other apps as well.

Perhaps you are overriding the volume keys in your app by mistake? Have you set up a key listener in your code and is it returning true for all keys? If so, then that would override Android’s default handling of the volume keys… as well as other keys.

Or perhaps you are referring to controlling the volume via our [lua]audio.setVolume()[/lua] function? In that case, that function only controls the volume of sounds played via the [lua]audio[/lua] API and not the [lua]media[/lua] API.
[import]uid: 32256 topic_id: 24692 reply_id: 135786[/import]

My listener returns the right values and the same happens even when I disable the listener. This worked before as I had the media volume changing properly. I still have an old build where it works correctly.

It seems to have changed since I started to use the media API due to the android sound lag. I’m using the latest public build 2012.971 and a Samsung Glaxy S3. [import]uid: 92709 topic_id: 24692 reply_id: 135791[/import]

One thing we noticed was that modifying the volume before a sound was played would modify the ringer volume. Our quick-but-effective workaround was to play a short audio track at 0 volume on App Start to force the Audio system to kick in and let our volume buttons affect the Media volume right from the app start. [import]uid: 134101 topic_id: 24692 reply_id: 135796[/import]

I verified this is an issue on two devices I tested: Galaxy SII and SIII. This was verified with our EventSound sample app that uses media.playEventSound. I filed a bug report, #19689, for this issue. [import]uid: 7559 topic_id: 24692 reply_id: 135832[/import]