1. Download our Official Android App: Forums for Android!

Apps 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
    Rank:
    None
    Points:
    15
    Posts:
    1
    Joined:
    Feb 29, 2016

    Feb 29, 2016
    1
    0
    15
    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,
    Helge
     

    Advertisement

Share This Page

Loading...