- How to Block the Volume Buttons on Android
- Switch Volume Buttons to Media Only
- Remap Buttons with Buttons Remapper
- Using Rocket Locker for Older Devices
- Block with Volume Lock & Mute
- Wrapping Up
- Never Miss Out
- One comment
- Leave a Comment Cancel reply
- Popular Posts
- Как на Android переключать песни длительным нажатием на кнопки регулировки громкости
- Приложениям в Android нельзя задействовать длительное нажатие клавиш
- This Android app lets you long press the volume buttons to skip songs while the screen is off – WITHOUT Root!
How to Block the Volume Buttons on Android
You’re anxiously awaiting an important call, but it’s not until much later that you realize your ringer volume was accidentally turned down too low to hear. Turning the volume up and down is easy on Android devices – sometimes too easy. Simply picking up your phone or letting someone else borrow it could change the volume. But if you block the volume buttons on Android, your settings can’t be changed accidentally.
There are several ways to do this using third-party apps. The good news is no root is required.
Switch Volume Buttons to Media Only
It’s quick and easy to adjust the volume when you’re listening to media on your device. But you usually don’t realize the ringer or notification volume is off or too low until you’ve missed a call or text. Changing one setting on Android helps you block the volume buttons from changing anything except media by default.
Press your volume up or down button to display your current ringer volume level. Tap the drop-down arrow at the top right of the volume window.
Toggle the “Use the Volume keys for media” option to On. You can also access this on “Settings -> Sound -> Volume.”
Remap Buttons with Buttons Remapper
Buttons Remapper works a little differently. It doesn’t block the volume buttons on Android; instead, it gives them a different purpose by remapping them. However, one of those purposes is “Do Nothing,” essentially blocking the volume buttons.
Once you download the app, you’ll need to follow the instructions in the app to enable it in your Accessibility settings. Before you remap your volume keys, ensure your volume levels are where you want them to be.
Open Buttons Remapper and tap the yellow + button to add a new remap action. Ensure the “Services enabled” box is toggled to on. It may or may not turn on automatically when you enable the service in Accessibility.
Choose “Short and long press.”
Select the “Volume +” button. You can check “Long Press” to ensure long pressing doesn’t change anything accidentally. Under Action, choose “Do Nothing” or any other action of your choice. Tap OK when done.
Repeat the process for your Volume – button. If you’re only worried about your volume getting turned down, you can just remap the the Volume – (down) button.
The app is free, but some features are premium only. Remapping your volume keys is free, though. If you want to re-enable your volume keys, long-press on the Volume key actions and delete them.
Using Rocket Locker for Older Devices
Rocket Locker helps you block the volume buttons on Android – but only for your ringtone and notifications. All you have to do is activate it. From that moment on, every time you press the volume buttons on your device, the multimedia volume will be changed and not the ringer volume. If you ever want to change the volume of the ringer, you can do that manually by going to “Settings -> Sound.”
The only problem is the app is no longer actively developed, which is disappointing as it works so well. It works best on Android 7.0 and earlier, though it does still work on some Android 8.0 and later devices.
Block with Volume Lock & Mute
The first thing you need to do is download the Volume Lock & Mute app from Google Play, but don’t open it just yet. With this app, you can say goodbye to someone changing your volume settings on your phone.
Set the volume of your phone to where you would like it to stay. Once that is set, open the app and tap the box that says “Lock Volume at Current Level.” There you will also see the “Lock Voice Call Volume” and “Lock Media Volume.”
Besides blocking the ringer volume and the volume for the notifications, it can do much more since the apps can block the volume for the alarm, music, games volume during calls, the volume of the taps on your phone’s display, and the system sounds.
Remember that with Volume Locker, if you change the ringer volume with the button on your phone, the app will give you 30 seconds to apply these changes. If you do not do anything within this time frame, the app will automatically apply the previously programmed settings.
Wrapping Up
With these useful apps, you will no longer have to put up with those annoying situations when you realize that your preferred settings have been changed by either someone you lent your phone to or by you (accidentally, of course). If your phone’s Power button isn’t functioning, learn how you can turn your phone on without the Power button.
Never Miss Out
Receive updates of our latest tutorials.
Crystal Crowder has spent over 15 years working in the tech industry, first as an IT technician and then as a writer. She works to help teach others how to get the most from their devices, systems, and apps. She stays on top of the latest trends and is always finding solutions to common tech problems.
One comment
Such a frustrating thing to have to overcome this many years since my first crappy Smartphone. I had a SG note 5 that I just retired and that phone didn’t cause me this problem or so many more that I am facing with my New Moto G Stylus. I hate to say this is a stupid Smartphone but I am starting to regret my purchase as I am finding so many odd missing settings and random glitches that ruin my basic use of my device, I chatted with a Motorola support this afternoon because of a random pop-up that happens every time I use the keyboard it says “no favorites” and stays on top of my messages as I type or in the browser etc.
Leave a Comment Cancel reply
Popular Posts
INNOCN PF15-PRO Portable Touchscreen Monitor Review
Android Device Overheating? — Here’s How to Cool It Down
How to Sync Your Game Progress Between Android Phones
20 Android TV Apps to Supercharge Your Smart TV
10 Best Sticker Packs for WhatsApp
How to Find Downloaded Files on Any Android Device
6 Best Android Auto Alternatives You Can Use
7 Useful Android Volume Control Apps to Fine Tune Your Device’s Volume
How to Sideload Apps on Fire TV, Roku, Android TV, Google Chromecast
Fix Google Play Services Battery Drain on Android
How to Completely Block Internet Access for Specific Android Apps
Affiliate Disclosure: Make Tech Easier may earn commission on products purchased through our links, which supports the work we do for our readers.
Источник
Как на Android переключать песни длительным нажатием на кнопки регулировки громкости
Если вы когда-нибудь ранее устанавливали кастомные прошивки (ROM) на свой смартфон, то, скорее всего, видели функцию, позволяющую назначить на длительное нажатие кнопки громкости управление воспроизведением мультимедиа. Если эта опция включена, вы можете зажать кнопку увеличения громкости, чтобы перейти к следующему треку, или таким же образом зажать кнопку уменьшения громкости, чтобы вернуться к предыдущей композиции. Возможность переключать песни нажатием на кнопки громкости настолько популярна среди пользовательских кастомных прошивок, что мы удивлены тому, что она до сих пор не попала в лаунчер какого-нибудь крупного производителя смартфонов.
Приложениям в Android нельзя задействовать длительное нажатие клавиш
По правде говоря, назначить управление воспроизведением музыки на кнопки регулировки громкости можно при помощи популярных приложений Tasker или Button Mapper, ведь они как раз и созданы для того, чтобы переназначать в Android функциональность различных физических клавиш. Однако ни одно из этих приложений не умеет повторить в точности то, что могут предложить кастомные прошивки. Если вы используете Tasker или Button Mapper, у вас есть возможность переназначить на кнопки увеличения и уменьшения громкости только одинарное или множественное нажатие. Приложения, подобные этим, обычно используют для перехвата нажатий клавиш громкости службу Специальные возможности, но ни одно из них не может перехватить длительное нажатие клавиш громкости, когда экран смартфона выключен.
Вскоре после выпуска исходного кода Android 8.0 Oreo разработчики с ресурса XDA Developers обнаружили в Android новую функцию, которая позволяет сторонним приложениям видеть, когда система реагирует на длительное нажатие клавиш регулировки громкости. Разработчики предположили, что этот новый API в будущем позволит приложениям контролировать длительное нажатие на кнопку регулировки громкости, даже когда экран смартфона выключен, что, в конечном итоге, позволит в сторонних приложениях воспроизвести популярную функцию из кастомных прошивок без необходимости рута.
Именно это и сделал пользователь с форума XDA, создав приложение Next Track. Это приложение с открытым исходным кодом, использующее вышеупомянутый API, позволяет переключать композиции длительным нажатием любой кнопки громкости даже при выключенном экране. Оно работает на любом устройстве под управлением Android 8.0 Oreo, Android 8.1 Oreo, Android 9 Pie или Android Q.
Чтобы настроить Next Track, все, что вам нужно сделать, это установить само приложение из Google Play и запустить следующую ADB-команду:
./adb shell pm grant com.flar2.volumeskip android.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER
С более подробной инструкцией для MacOS и для Windows от разработчика можно ознакомиться здесь.
Этот же разработчик работает над обновлением своего приложения Button Mapper, чтобы оно использовало новый API. Для реализации в Button Mapper переключения композиций длительным нажатием кнопок громкости разработчику пришлось использовать в каком-то роде хакерской метод, а поэтому вся функциональность сбрасывалась при каждой перезагрузке устройства, чего не должно происходить при использовании нового API.
Поскольку это скрытый API, нет гарантии, что Google не убьет доступ к нему в будущем обновлении Android. Начиная с Android Pie, Google работает над ограничением недокументированных/скрытых API, поэтому этот способ может перестать работать в финальной версии Android Q или Android R.
Приложение: Next Track
Разработчик: flar2
Категория: Музыка и аудио
Цена: Бесплатно
Скачать: Google Play
Делитесь своим мнением в комментариях под этим материалом и в нашем Telegram-чате.
Источник
This Android app lets you long press the volume buttons to skip songs while the screen is off – WITHOUT Root!
If you’ve ever installed a custom ROM before, then there’s a good chance you’ve seen a feature that lets you remap a long press of the volume button to control media playback. With this option enabled, you can long press the volume up button to skip to the next track or long press the volume down button to return to the previous track. The ability to skip songs with volume button presses is so ubiquitous among custom ROMs that we’re surprised to see it hasn’t made its way into software from major OEMs.
We’ve covered ways to control music playback via the volume buttons using apps like Tasker or Button Mapper, but none of these apps replicate exactly what custom ROMs are able to offer. If you use Tasker or Button Mapper, you can only remap single or multi-presses of the volume up and down buttons. Apps like these either listen for changes in the media volume or use an Accessibility Service to intercept button presses from the volume keys, but neither solution is viable to intercept long-pressing of the volume keys when the screen is off.
Shortly after the release of Android 8.0 Oreo’s source code, I spotted a new Android feature that would allow an Android app to be set as the “volume key long press listener.” We speculated that this new API would allow apps to control the long-press volume button behavior when the screen is off, thus finally making it possible to replicate the popular custom ROM feature without needing root. Although the feature was implemented in AOSP, Google never added a user-facing way to set an app as a volume key long press listener. Like with Android’s hidden navigation bar customizer, this feature can still be used even without an implementation in the Settings app.
That’s exactly what XDA Member Cilenco did with the Skip Track by Volume Keys app. It’s an open source app that uses the hidden volume key long press listener API to let you change music tracks with a long press of either volume button even while the screen is off. It works on any Android 8.0 Oreo, Android 8.1 Oreo, Android 9 Pie, or Android Q device. The app was developed a few months after we published our article (the developer even cites the article as their inspiration for the app), but it was never shared on our forums until late last month when it was finally brought to our attention. We quickly took it for a spin to see if it worked—and it does! Here’s a hands-on video from XDA TV’s Max Weinbach:
To set it up, all you have to do is install the APK from GitHub and run the following ADB command:
Then, enable the app’s Notification Listener service. This Notification Listener service doesn’t actually do anything, it’s just there to make sure the app doesn’t get killed in the background. On my Huawei Mate 20 X, I had to disable EMUI 9’s aggressive memory optimization feature, but after that I can confirm that it does work on EMUI. Since this is a hidden API, there’s no guarantee that Google won’t kill access to it in a future Android release. Since Android Pie, Google has been working on restricting undocumented/hidden APIs, so this may not work in the final release of Android Q or Android R.
Alternatively, if you would rather not install the APK from GitHub, you can try the newly updated release of Next Track (version 1.18) from XDA Recognized Developer flar2. He worked quickly to update this app after I informed him of this API, so go check that out if you want something a bit more customizable. Instructions on how to set it up can be found here. The developer is working on updating his Button Mapper app to use the new API, too. Button Mapper’s existing method to remap long presses of the volume button while the screen is off was a bit hackier and would reset on every reboot, but the new API persist across boots.
Источник