Is it possible to take photos using the volume controls on the iPhone?
Ideally, the takePicture()
method would be called when the volume button is pressed.
Is it possible to take photos using the volume controls on the iPhone?
Ideally, the takePicture()
method would be called when the volume button is pressed.
Add an event listener.
Titanium.Media.addEventListener('volume', function(e) {
Ti.Media.takePicture();
});
Make sure the event listener is added when the camera is already shown. Docs here: http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Media-method-takePicture
Old, but still relevant: program access to iPhone volume buttons
Also consider adding better tags to your question, objective c, ios, xcode, etc.