Disable speaker on Android...

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
tjo7777
Posts: 34
Joined: Fri May 02, 2014 9:16 pm

Disable speaker on Android...

Post by tjo7777 » Fri Sep 29, 2017 10:44 am

Does anyone know of a way to disable the speaker on an Android device?

I still need to have audio coming from the headphone jack so I cannot simply turn the volume all the way down unless there is a way to do this independently for the speaker only but not the headphones.

Thanks in advance for any suggestions or advice,

TJ.

AndyP
Posts: 614
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: Disable speaker on Android...

Post by AndyP » Fri Sep 29, 2017 12:56 pm

Are you looking at doing this via Livecode or just generally?

If the latter then the speaker should automatically turn off when a headphone jack is inserted.
In some cases I've noticed that this does not happen if the jack is inserted after the app has been started, but inserting the jack and then starting the app works??!!
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search

tjo7777
Posts: 34
Joined: Fri May 02, 2014 9:16 pm

Re: Disable speaker on Android...

Post by tjo7777 » Fri Sep 29, 2017 6:21 pm

Hi Andy,

Thanks for your reply.

In general you are correct that inserting the headphone plug into the jack disables the speaker. However many Android users have found that for some reason notifications are still played through the speaker even when headphones are plugged in.

I am looking for a way to disable the speaker entirely, or at least stop notifications from being played through the speaker when headphones are plugged it.

I have seen one Android app that can do this. It is called SoundAbout and has an option under Alert behaviour > Wired Headset behaviour > Notifications to:

I am trying to add similar functionality to my app using LiveCode.

Any suggestions or advice are greatly appreciated,

TJ.

Post Reply

Return to “Android Deployment”