Access volume control from Kiosk Mode

Gepostet über 1 Jahr her von Katharina.linden

Ein Thema veröffentlichen
Nicht gelöst
K
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! 

  


0 Stimmen


3 Kommentare

Sortiert nach
Lukas Brandt

Lukas Brandt gepostet über 1 Jahr her

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);



0 Stimmen

K

Katharina.linden gepostet über 1 Jahr her

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!

0 Stimmen

K

Katharina.linden gepostet über 1 Jahr her

This question is still not resolved - is there any way to adjust the volume while the robot is in Kiosk mode? TIA! 

0 Stimmen

Anmelden oder Registrieren um einen Kommentar zu veröffentlichen