From efc7049dfdda5a2ebb4566cbc2225428cd98eb1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?w=C3=B3jcik=2Eonline?= <35582382+wojcik-online@users.noreply.github.com> Date: Wed, 7 Feb 2018 19:24:25 +0100 Subject: [PATCH] Control media volume with the hardware buttons. Control media volume with the hardware buttons in the MainActivity. This is how the YouTube app works. Closes #1072. --- app/src/main/java/org/schabi/newpipe/MainActivity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 9e8f3fa76..85bb04d6d 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -95,6 +95,8 @@ public class MainActivity extends AppCompatActivity implements HistoryListener { if (getSupportFragmentManager() != null && getSupportFragmentManager().getBackStackEntryCount() == 0) { initFragments(); } + + setVolumeControlStream(AudioManager.STREAM_MUSIC); setSupportActionBar(findViewById(R.id.toolbar)); setupDrawer();