openxc / openxc-android

Android library for accessing vehicle data from an OpenXC vehicle interface
BSD 3-Clause "New" or "Revised" License
236 stars 115 forks source link

Investigate modifying the Andriod emulator GUI #18

Closed peplin closed 10 years ago

peplin commented 11 years ago

A combination of an emulator skin with:

http://stackoverflow.com/questions/5567475/adding-a-button-to-the-android-emulator-skin

http://heikobehrens.net/2011/03/15/android-skins/

peplin commented 11 years ago

Key mapping is actually not supported in the capacity we need - you can only specify keys for predefined emulator events:

 BUTTON_HOME         BUTTON_VOLUME_DOWN  BUTTON_DPAD_CENTER  
    BUTTON_MENU         BUTTON_CAMERA       BUTTON_DPAD_LEFT    
    BUTTON_STAR         CHANGE_LAYOUT_PREV  BUTTON_DPAD_RIGHT   
    BUTTON_BACK         CHANGE_LAYOUT_NEXT  BUTTON_DPAD_UP      
    BUTTON_CALL         TOGGLE_NETWORK      BUTTON_DPAD_DOWN    
    BUTTON_HANGUP       TOGGLE_TRACING      ONION_ALPHA_UP      
    BUTTON_POWER        TOGGLE_FULLSCREEN   ONION_ALPHA_DOWN    
    BUTTON_SEARCH       TOGGLE_TRACKBALL    
    BUTTON_VOLUME_UP    SHOW_TRACKBALL      
peplin commented 11 years ago

Short of changing the source of the emulator, I think the best thing we can recommend is to implement button event handlers in your application to accept either VehicleButtonEvent from OpenXC or the plain key events from Android.

peplin commented 11 years ago

I've documented the recommended method in openxc-android - we can revisit a custom emulator in the future.