Affects Version/s: Release 6.0.0
Fix Version/s: Release 7.0.2
Ti SDK 6.3.0.GA
Android OS - 6.0.1
Device - Moto G4 Play
Sprint:2017 Sprint 24 SDK, 2017 Sprint 25 SDK, 2017 Sprint 26 SDK, 2018 Sprint 01 SDK, 2018 Sprint 02 SDK
Using an `overlay` in `Ti.Media.showCamera()` requires to capture picture programmatically using `Ti.Media.takePicture()` method, but when used with `autohide:false`, the `success` callback is fired repeatedly on my Moto G4 Play device. This Moto device is able to auto-focus perfectly & that's why the console shows the relevant log but it's certainly a bug as it's impossible to create a custom-overlay camera feature to capture pics continuously without closing the camera.
On the other hand, my Samsung On5 device was not firing success callback multiple times but it was also not able to auto-focus on things. So it seems the issue is related to auto-focus feature which is very much required & thus making overlay useless on my Moto G4 Play device.
Steps to reproduce:
1- Tap 'Open Camera' button
2- Tap `Take Picture` button & do not press back button in order to keep camera window open
3- Try to notice if your device is able to auto-focus or not by moving the camera around quickly.
4- If your device is able to auto-focus on different objects, then only success callback will be fired multiple times.
Here's a sample code for this:
Here's the output of this code on Moto G4 Play device:
Here's is the Java code link causing this issue : https://github.com/appcelerator/titanium_mobile/blob/949d3cda48dbf98381cbdcbad191d48cd4868df7/android/modules/media/src/java/ti/modules/titanium/media/TiCameraActivity.java