1. Are you ready for the Galaxy S20? Here is everything we know so far!

Keypress from bluetooth keyboard when app not in foreground

Discussion in 'Android Development' started by HelgeLange, Feb 29, 2016.

  1. HelgeLange

    HelgeLange Lurker
    Thread Starter

    Hi there,

    I'm kinda new to android programming and don't know a lot about androids internal message system.
    The problem i'm having is that I have no clue what message system I have to ask for a key from a keypress on a bluetooth button (like the ones that take a picture with your camera) when my app isn't active.
    When my app is in the foreground I get the keypress event w/o trouble, the scancode like 171. And I can react to it. But I would like to execute the same internal action when my app isn't the foreground app, for ex. you're in the main menu or in another app. My app ist still running with it's threads and everything, I already tested that.
    Any ideas ?

    thanks in advance,


Share This Page