We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2002

Summary: Feature request : Android, let the OS handle the Volume key code.
Product: SDL Reporter: Sylvain <sylvain.becker>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED DUPLICATE QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: philipp.wiesemann
Version: HG 2.0   
Hardware: ARM   
OS: Android (All)   

Description Sylvain 2013-07-31 15:13:52 UTC
hello,

Maybe we could let Android handle Volume buttons ...
This comes from PELYA's porting :

    // Key events
    @Override
    public boolean onKey(View  v, int keyCode, KeyEvent event) {
 
        // Buttons Volume handled by application
        if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN || keyCode == KeyEvent.KEYCODE_VOLUME_UP) 
        { 
           if (event.getAction() == KeyEvent.ACTION_DOWN)
           {
              return super.onKeyDown(keyCode, event);
           }
           else if (event.getAction() == KeyEvent.ACTION_UP) 
           {
              return super.onKeyUp(keyCode, event);
           }
        }
         
        ...
Comment 1 Philipp Wiesemann 2013-07-31 16:22:03 UTC
See bug #1569.
Comment 2 Sam Lantinga 2013-08-01 00:06:44 UTC

*** This bug has been marked as a duplicate of bug 1569 ***