Respecting ringer/media volume?

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
SteveTX
Posts: 170
Joined: Sun Jan 17, 2010 9:00 pm

Respecting ringer/media volume?

Post by SteveTX » Tue Jul 23, 2013 7:39 am

mobilePlaySoundOnChannel doesn't seem to respect the system's volume settings, playing at 100% volume when the system is set to mute or vibrate. Is there a way to get the system volume setting or force the playback system to respect it?

SteveTX
Posts: 170
Joined: Sun Jan 17, 2010 9:00 pm

Re: Respecting ringer/media volume?

Post by SteveTX » Tue Jul 23, 2013 9:23 pm

I would have presumed there would be an accessible pre-made channel like "system", from which we could derive the volume settings via something like mobileSoundChannelVolume("system") to find out if the user has muted the device in a movie theatre. This is an absolutely essential function for any app/game, I will be very surprised if it turns out LiveCode doesn't have this. The only other method I can think of would be trying to interface to android API via java to try to extract that setting, which is very unproven if java interfaces can be established on android. Nobody knows the answer?

SteveTX
Posts: 170
Joined: Sun Jan 17, 2010 9:00 pm

Re: Respecting ringer/media volume?

Post by SteveTX » Thu Jul 25, 2013 9:42 pm

Discovered mobilePlaySoundOnChannel is respecting android device's Media volume level, not the Ringer volume level. This is why it still plays with full loudness even when the user has their phone set to silent.

I have confirmed that iphonePlaySoundOnChannel does not work for android, tested on mutliple actual devices, these commands are not synonyms despite what the documentation says.

Post Reply