Search code examples
androidandroid-intentbroadcastreceiverandroid-seekbar

Issue SeekBar OnProgressChanged


I have the following problem with the seekbar(sickbar more):
I implemented this for a radio app so that if the users want to change the volume from the UI they can do it by using the seekbar.
Also I want to be able to update the seekbar if by chance the volume is changed as a result of the media buttons action(s).
Having this in mind, I implemented a BroadcastReceiver class that listens to volume_changed_action(the media button action doesn't work for me - case closed, don't bother).
Now, let's imagine one user decides to play with the seekbar(move the bar up-down or left-right quick), then I noticed that the onProgressChanged will move accordingly to the sound change(not volume changed as it is supposed to).
Have anybody an idea why?
I managed to overcome the problem but I want to know why this happens.

Edit
If this has been asked before please tell me, I didn't find it.

Thanks for the help


Solution

  • I managed after all, solution being to check if the boolean flag manual from onSeekBarChanged is true or not.