Description
Currently when using Ti.Media.showCamera, the photo will be saved to the users photo gallery by default, regardless of the saveToPhotoGallery setting. By default the file should not be saved to the photo gallery
var win = Ti.UI.createWindow({ backgroundColor: 'green', layout: 'vertical' }),
openButton = Ti.UI.createButton({ title: 'OPEN CAMERA', backgroundColor: 'blue', top: 25 });
openButton.addEventListener('click', function () {
Ti.Media.showCamera({
success: function (e) {
var img = Ti.UI.createImageView({
image: e.media
});
win.add(img);
},
error: function (e) {
alert('showCamera() error: ' + JSON.stringify(e));
}
});
});
win.add(openButton);
win.open();
Steps to reproduce
Add the code above to an existing app.js
Build for Windows
Tap the show camera button and take a photo
Add the following to your tiapp under the windows section
<manifest>
<Capabilities>
<uap:Capability Name="picturesLibrary" />
<uap:Capability Name="videosLibrary" />
</Capabilities>
</manifest>
5. Rebuild and repeat the steps
Actual
Without the capabilities, after taking the photo the app will throw an access denied in the alert.
With the capabilities a photo will be added to the window, and to the devices photo gallery
Expected
A photo should be added in both cases, neither should add the photo to the photo gallery
https://github.com/appcelerator/titanium_mobile_windows/pull/1036
Merged to 6_2_X https://github.com/appcelerator/titanium_mobile_windows/pull/1079
Verified in 6.2.0.v20170821001430, closing ticket