I want to update my seekbar based on physical volume music key but my code dont work!
please help me..

```
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
    AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
    if (keyCode == KeyEvent.KEYCODE_VOLUME_UP || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN){
        customSeekBar.setProgress(audioManager.getStreamVolume(AudioManager.STREAM_MUSIC));
        return true;
    } 
    return super.onKeyDown(keyCode, event);
}

```