Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Runtime Development

Reply
New Developer
Noureen
Posts: 8
Registered: ‎09-24-2012
My Carrier: BlackBerry

BlackBerry Palybook Volume setting problem

Hi!
  I am trying to set the volume of BB Playbook in android through audio manager using SeekBar but the volume of device is not changing. however if i try to get the current volume of system (BB Palybook) it shows me the correct volume but when i try to set the volume through seekBar it did not works. here is my code :

 

import android.media.AudioManager;

this is the import for audioManager

 

AudioManager audioManager;

this is the audioManager variable

 

seekbar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {

public void onStopTrackingTouch(SeekBar seekBar) {
// TODO Auto-generated method stub

}

public void onStartTrackingTouch(SeekBar seekBar) {
// TODO Auto-generated method stub

}

public void onProgressChanged(SeekBar seekBar, int progress,boolean fromUser) {
// TODO Auto-generated method stub

audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, progress, 0 );


}

 

});

 

Please if anyone have solution to this problem. what i think that this happens due to BB security restrictions. Is that so??

Please use plain text.
New Developer
jordaan0_gmail
Posts: 23
Registered: ‎08-03-2012
My Carrier: mtn

Re: BlackBerry Palybook Volume setting problem

There is a glitch in the 2.3.3 runtime that stops the track bar from operating. Correctoy.

Have you tried setting the volume with a different ellememt, like a button or text box for example.

 

Please use plain text.
New Developer
Noureen
Posts: 8
Registered: ‎09-24-2012
My Carrier: BlackBerry

Re: BlackBerry Palybook Volume setting problem

[ Edited ]

 yes i hav tried it through setting volume like this:

 

audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, progress, 0 );


audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, 13, 0 );

 

my device give maxVoleum to 15 so instead of progress using seekbar i set the volume by giving a number.

Please use plain text.