Issue Description
Trying to check the camera feature in Windows Platform but the default camera controls are not shown an also front camera is opened. We are unable to capture a picture. Even tried placing the overlay didn't help. We are using titanium SDK 5.2.2.GA. Please find the attached screen shot and code.
Test Case
var win = Ti.UI.createWindow({
layout : 'vertical',
backgroundColor : 'white'
});
var button = Ti.UI.createButton({
title : 'take picture',
color : 'black'
});
button.addEventListener('click', function() {
Ti.Media.showCamera({
'cancel' : function() {
Ti.API.info('cancel');
},
'error' : function() {
Ti.API.info('error');
},
'success' : function(e) {
Ti.API.info('success: size=' + e.media.length);
imageView.image = e.media;
}
});
});
win.add(button);
var imageView = Ti.UI.createImageView();
win.add(imageView);
// setTimeout(function() {
// Ti.Media.hideCamera();
// }, 3000);
win.open();
Hello, I am able to to reproduce the issue with given code. The camera opens for
Ti.Media.showCamera
but camera control is not showing. Its is not possible to take picture from there or go back to app. Windows default camera app works fine on the same device. I added following capabilities which *did not* solve the issue.*Environment*: *OS :* Microsoft Windows 8.1 Enterprise N *Device info:* Microsoft Lumia 640 (Windows Phone 8.1) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.4.0.v20160429102159 *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.5.0
Fixed by TIMOB-23262
ok I see. There's a Windows API to show builtin camera UI: [CameraCaptureUI](https://msdn.microsoft.com/windows/uwp/audio-video-camera/capture-photos-and-video-with-cameracaptureui), but it seems it does not work on Windows Phone 8.x. So as far as I can see default camera UI can not be archived on WP 8.1. We could use CameraCaptureUI for Windows 10 (including Mobile). [~cwilliams] Do you think we can move this feature to 6.0.x as this is new feature?
Yes for now.
Pushed PR for builtin camera UI for Windows 10 (Mobile). https://github.com/appcelerator/titanium_mobile_windows/pull/748 Unfortunately, this control is not supported on Windows Phone 8.1 natively. For workaround for Windows Phone 8.1, we could use
Ti.Media.openPhotoGallery
instead, to launch builtin camera UI. !SE-SS 2.png|thumbnail![~kota] I need docs to be updated on 5_4_X with regards to this, what can be supported and what cannot. Can you do that for me please?
[~cng] Sure, will do.
https://wiki.appcelerator.org/display/guides2/Camera+and+Photo+Gallery+APIs#CameraandPhotoGalleryAPIs-DisplayingbuiltincameraforWindows
Verified using: OS: Microsoft Windows 10 Pro 10.0.14393 Appc core: 6.0.0-38 Appc NPM: 4.2.8-6 Ti SDK: 6.0.0.v20160904203840 Lumia 930: 10.0 When using the camera and not specifying an overlay the native camera controls are used Closing ticket