How to handle changes from MediaSession remote volume overlay?

Using the Activity’s setVolumeControlStream method—typically within its onCreate method—
allows you to specify which audio stream should be controlled by the volume keys while the current
Activity is active:

@Override
public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.audioplayer);

   setVolumeControlStream(AudioManager.STREAM_MUSIC);
}

You can specify any of the available audio streams, but when using the Media Player, you should
specify the STREAM_MUSIC stream to make it the focus of the volume keys.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)