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 2036

Summary: Android : use Zoom button as Volume Key
Product: SDL Reporter: Sylvain <sylvain.becker>
Component: *don't know*Assignee: Gabriel Jacobo <gabomdq>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: gabomdq
Version: HG 2.1   
Hardware: ARM   
OS: Android (All)   

Description Sylvain 2013-08-14 10:06:47 UTC
Hi,

Well ... this comes from Samsung app certification process :
The "galaxy camera HD" is both an android device and camera.

There is no volume buttons on it, but Zoom buttons.

Samsung requires for the app certification that the camera "zoom" button acts like a volume button!

My app use the current trunk version and works correctly with the hardware volume buttons on usual phones. but it appears it failed specifically on this device with Zoom button.

Dont know how to fix it..
I found this (see the video) this is the upper left button : http://forum.unity3d.com/threads/184350-Samsung-store-will-reject-Unity-apps-because-of-device-volume-and-device-back-buttons

thanks,

Sylvain
Comment 1 Gabriel Jacobo 2013-08-14 10:49:29 UTC
Look for KeyEvent.KEYCODE_VOLUME_UP in SDLActivity.java, you'll see they are bypassed so Android can apply the default behaviour. You probably need to add whatever code corresponds to those zoom buttons. If you figure what those are let us know!
Comment 2 Sylvain 2013-08-14 10:57:01 UTC
Well I found this : 

http://stackoverflow.com/questions/15115012/android-api-to-detect-samsung-galaxy-camera-zoom-buttons

That could be:

KeyEvent.KEYCODE_ZOOM_IN 
KeyEvent.KEYCODE_ZOOM_OUT


But I couldn't try it as I dont have the device.
Comment 3 Sylvain 2013-08-16 03:14:31 UTC
I submitted a modified version of my application with a patch and see if it passes the certification.
I will let you know.
Comment 4 Gabriel Jacobo 2013-08-19 12:33:23 UTC
KEYCODE_ZOOM_IN and KEYCODE_ZOOM_OUT, are API Level 11, so they would have to be added as their corresponding values, otherwise there'll be a compilation error
Comment 5 Gabriel Jacobo 2013-08-22 13:25:36 UTC
http://hg.libsdl.org/SDL/rev/eb769105631b
Comment 6 Sylvain 2013-08-22 13:30:11 UTC
May I ask you why we don't upgrade the Build Properties to compile with API_18 since this is it the latest ? 

Together with keeping min-target=10 in the ManifestXml.
Comment 7 Sylvain 2013-08-22 13:47:22 UTC
BTW, the modified app with ZOOM_IN/OUT + CAMERA passed the certification.

Thanks