Hello Katharina,
the volume of Pepper is controlled via Android with AudioManager and the StreamType STREAM_MUSIC.
You can control this as follows to set the volume to 70%:
AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); int currentVolume = audio.getStreamVolume(AudioManager.STREAM_MUSIC); int maxVolume = audio.getStreamMaxVolume(AudioManager.STREAM_MUSIC); float percent = 0.7f; int seventyVolume = (int) (maxVolume*percent); audio.setStreamVolume(AudioManager.STREAM_MUSIC, seventyVolume, 0);
Hi Lukas,
thanks for your reply! This seems to be the method I've been using so far. I used the .adjustStreamVolume with the AudioManager and
type STREAM_MUSIC and connected it with a Qi bookmark, so users can adjust the volume by voice command.
This works fine, as long as the robot is NOT in Kiosk Mode. As soon as I switch to Kiosk Mode this feature does no longer work. I assumed this is due to calling the volume from the settings? Is there any way around this? For my application, I do need the robot in Kiosk Mode to prevent users from changing basic settings by mistake or even deleting apps - but at the same time it is vital, that users can adjust the volume to their needs.
Looking forward to your reply - and thank you in advance!
This question is still not resolved - is there any way to adjust the volume while the robot is in Kiosk mode? TIA!
Katharina.linden
Hi everyone,
is there a way to allow users to adjust the robots volume, while the robot is in Kiosk Mode? Possibly by using a voice command?
Thanks in advance - Any help is appreciated!