Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [solved]Hardware Audio buttons not working with my app.
Forum Updated to NodeBB v4.3 + New Features

[solved]Hardware Audio buttons not working with my app.

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    koolbi
    wrote on last edited by
    #1

    Does anyone know how make the hardware audio buttons work for android? I am using media streamer to play the audio and it plays just fine but I cant change the volume with the hardware audio buttons. They actually don'd do anything when I press them when I am in the app. It will change the volume when I have the app running in the background with the audio playing. When the app is the main activity the buttons don't work but when it is not the main activity the buttons do not work. Any help here would be appreciated!
    I have also tried the app on 5 different devices with the same result.

    1 Reply Last reply
    0
    • GianlucaG Offline
      GianlucaG Offline
      Gianluca
      wrote on last edited by
      #2

      The problem arise because the QtActivity handles every buttons (from the android operating system point of view)… but QtActivity also does nothing by default. The results is that the hardware audio buttons are handled by QtActivity and hence the default behavior is not triggered and at the same time QtActivity simply do nothing.

      The only solution I found was to change the code of QtActivity … in a zone where comments says "never change!!": the implementation of onKeyDown inside QtActivity

      1 Reply Last reply
      0
      • K Offline
        K Offline
        koolbi
        wrote on last edited by
        #3

        @Gianluca I appreciate this answer very much! This is the first bit of help I have found on this subject. Thank you. I got it now! Thanks!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved