WELCOME TO EHOST.COM.NP

Tuesday, August 22, 2017

Android Oreo System Apps Can Set Volume Key Long-Press Listeners

ads space

Adding additional functionality to various hardware and software buttons on our devices is something Android enthusiasts have been doing for a while. Most people know about applications such as Button Mapper from XDA Recognized Developer flar2, and we even spoke about other remapper solutions back when the Galaxy S8 was released. While those solutions handled these actions in a certain way, Google looks to be implementing a listener in Android Oreo for long-pressing the volume keys. This means that potentially, applications in the future might be able to react to volume key long presses even while the screen is off, which could be used to bring an often-requested feature over from custom ROMs – music track control with volume key presses.

We do want to mention that this feature isn’t actually enabled in the user-facing build that we have available to us right now. Support for it is there though, as evidenced by the commit we found, and that means it can be enabled by the OEM for your specific device. As mentioned, traditional remapping applications work by detecting if a KeyEvent has been sent (even with long-presses and double presses), but these are only sent while the screen is on and also typically require the use of an Accessibility Service which can be taxing on the performance.

Your typical button remap solution can be considered to be a workaround to be used to toggle the torch on or off, opening an application, pulling down the notification panel and so on. However, what Google has implemented into Android Oreo takes this a step further with letting system applications themselves set up these volume button long-press listeners. This could allow the user to trigger something within the application itself once the platform detects a volume button has been held down for a few seconds.

The way Google has included support for this in Android Oreo, this will only work for “privileged” (aka pre-installed system) applications out of the box. The OEM just needs to allow the privileged application to have the android.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER permission in order to set the listener. However, we’ve been able to grant permissions like these with ADB commands so it’s possible that those of us in the know could manually set this for a 3rd-party applications too.

ads space
ADS SPACE

0 comments:

Post a Comment

Categories

Article How-to All Posts WordPress Android Web design Blogger Plugins CSS Google JQuery Plugins Programming Reviews Web Hosting Blogger Blogging Blogging Tips Tricks Web Development Facebook Git Internet Make Money Online Social Plugins Tips Tips and Tricks Tools Tutorials Windows WordPress Plugins Blogging Tips and Tricks Freebies GSM Google Analytics HTML How To's JavaScript Plugin Development S.E.O SEO SMS SmartPhone Social Media Tips amp; Tricks Top-Most Updates Webmaster Tools Whatsapp Applications Apps Blogger Basics Documentary Downloads Entertainment Gadgets Games Gmail Google AdSense Guest Post IPhone Make Money Blogging SVN Security Softwares Web Hosting Tips and Tricks Wordpress Tips Wordpress Tips and Tricks hostgator iOS Advertising Networks Advertising Technology Affiliates Antivirus Audience amp; Traffic Biography Blog post Blog post Blogger Blogger Errors Blogger Tips Blogger Tools Blogger Widget Blogosphere Bogger Widgets CSS selectors CSS symbols CSS3 Computer amp; Internet Content Writing Coupon Codes Data amp; Analytics Deleted blog Design DoubleClick for Publishers Email and newsletter marketting Email marketing Excel Tips Excel Tips and Tricks Facebook Tricks Feed Feedburner Feedburner subscribers Font Fun GitHub Giveaways Gmail primary inbox Gmail tabs Google sign-in Guides HTML amp; CSS HTML5 Infographics Inspirational Instagram Internet Marketing Internet Tips amp; Tricks Job Listings Knowledge Life Hacks Lists Make-Money Monetization amp; Conversion Monetize Navigation Online Marketing Other PHP Tutorials Passport Publishing amp; Content Quotes RSS Sidebar Smartphones Social Networking Status Tech Tech Blog Technology Telegram Themes UI / UX User Psychology amp; Research VB.Net Web Tools Web browser Widget Windows Tips Windows-10 ad viewability admin notice blogging tools bluehost cherry-pick clone cors custom scrollbar customizer dismissible notices duplicate post feed title git branch git clone gpg gpg2 hybridauth iPad icon font notice responsive wordpress theme same origin policy scrollbar signed git commit smartsvn theme customizer vcs wordpress theme wordpress themes

Blog Archive