Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Detecting trigger from selfie stick (Bluetooth keypress) on IOS and Android
Started by henrik5 Oct 23 2017 05:13 AM

4 replies to this topic
ios android bluetooth keypress
[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

henrik5

[GLOBAL: userInfoPane.html]
henrik5
  • Contributor

  • 247 posts
  • Corona SDK

This post is archived, or I would have asked there: https://forums.coronalabs.com/topic/42289-identify-volume-button-pressed-on-ios-possible/

- What we'd like to do is receive a keypress, any keypress.

- One way to get a keypress is to pair a Bluetooth device.

- Selected wireless selfie sticks send keypresses over Bluetooth to take the picture.

- On IOS, that keypress is Volume Up, which may cause a problem.

- We'd like to do this in Corona, not with native code.

 

Is there a spec of what keypresses are detected by Corona, or more information about these types of triggers and selfie stick support?



[TOPIC: post.html]
#2

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,758 posts
  • Enterprise

If you are trying to access volume button you may be able to hack together a solution with my volume control plugin. You should loop and check if the volume is changed (up or down) and then change it back and take photo

 

https://marketplace.coronalabs.com/plugin/volume-control



[TOPIC: post.html]
#3

henrik5

[GLOBAL: userInfoPane.html]
henrik5
  • Contributor

  • 247 posts
  • Corona SDK

Great, Scott :) Should actually work. We'll try it and report back!



[TOPIC: post.html]
#4

henrik5

[GLOBAL: userInfoPane.html]
henrik5
  • Contributor

  • 247 posts
  • Corona SDK

Is there a way to prevent the volume pop-up from showing - like in the built in camera app? 



[TOPIC: post.html]
#5

henrik5

[GLOBAL: userInfoPane.html]
henrik5
  • Contributor

  • 247 posts
  • Corona SDK

Is there a way to read a keypress on IOS without showing the keyboard, like on Android?

This could remove the need for my last question above.




[topic_controls]
[/topic_controls]