Opened 12 years ago
Closed 12 years ago
#727 closed enhancement/feature request (fixed)
adjust volume of speech (on android version)
Reported by: | zoff99 | Owned by: | cp15 |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | port/android | Version: | git master |
Severity: | Keywords: | volume | |
Cc: |
Description
for java app on android it works like this:
Call this API in your onCreate(): setVolumeControlStream(AudioManager.STREAM_MUSIC); This tells the AudioManager that when your application has focus, the volume keys should adjust music volume.
not sure if this function is available in C aswell?
but android is using ALSA, so it should also be possible to find the right volume and use alsa lib
Change History (2)
comment:1 Changed 12 years ago by sanderd17
comment:2 Changed 12 years ago by zoff99
- Resolution set to fixed
- Status changed from new to closed
actually now not all keys are overwritten anymore. this works now.
Note: See
TracTickets for help on using
tickets.
All hardware keys are overwritten, so this doesn't work.
There should be a method made which asks the volume, adds or substracts a certain value from this and sets it back. If that gives an OSD notification, that's a plus point.
the volume getter is the method
from the class http://developer.android.com/reference/android/media/AudioManager.htm The setter has the same syntax, and you can also ask the max volume. I suppose the min is 0.
I think the integer for the stream is the STREAM_MUSIC constant (3), but I'm not sure either.