Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Identify Volume Button Pressed on iOS - possible?
Started by RedBeach Dec 11 2013 12:03 PM

6 replies to this topic
volume button press pressed handler ios android
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

RedBeach

[GLOBAL: userInfoPane.html]
RedBeach
  • Corona Geek

  • 1,132 posts
  • Corona SDK

Hi.

 

I am planning in developing a game that I would have to identify when the user pressed the volume button.

 

Reading the forum and docs, it appears that Corona only provides that info for Android.

 

Anyone knows if using Corona Enterprise I could have access to that event?

 

 

 

I know that when coding directly in Objective-C that is possible, as you can see in the links below:

 

http://stackoverflow.com/questions/7528443/iphone-detect-volume-keys-press?rq=1

 

http://ios.biomsoft.com/2011/12/07/taking-control-of-the-volume-buttons-on-ios-like-camera/

 

 

Thanks



[TOPIC: post.html]
#2

RedBeach

[GLOBAL: userInfoPane.html]
RedBeach
  • Corona Geek

  • 1,132 posts
  • Corona SDK

[TOPIC: post.html]
#3

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,053 posts
  • Enterprise

The iOS volume buttons are not exposed to Corona SDK.

 

Rob



[TOPIC: post.html]
#4

RedBeach

[GLOBAL: userInfoPane.html]
RedBeach
  • Corona Geek

  • 1,132 posts
  • Corona SDK

Even in a Enterprise edition?



[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,053 posts
  • Enterprise

I can't be for certain.  If iOS native apps can get it, then Enterprise should, but my understanding is that iOS doesn't expose the volume key to apps.  Back in the day Camera+ figured out how to do it using URL scheme's but Apple ended up rejecting them for doing it.  They specifically banned apps from repurpousing the keys.  But then Apple eventually added camera support to the volume buttons.  So I don't know what the status of volume key support is today.

 

Rob



[TOPIC: post.html]
#6

RedBeach

[GLOBAL: userInfoPane.html]
RedBeach
  • Corona Geek

  • 1,132 posts
  • Corona SDK

The links that I provided exactly shows that iOS expose it and also talks about the Camera+ app (that was banned but when Apple updated its own Camera app, the Camera+ app was allowed to come back).



[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,053 posts
  • Enterprise

Then you should be able to use Enterprise.

 

Rob




[topic_controls]
[/topic_controls]