Skip to content

Instantly share code, notes, and snippets.

@donayama
Created November 18, 2011 14:48
Show Gist options
  • Save donayama/1376645 to your computer and use it in GitHub Desktop.
Save donayama/1376645 to your computer and use it in GitHub Desktop.
cameraでtabを押すと...
Ti.Media.showCamera({
success : function(event) {
alert('Your photo was saved to the Photo Gallery');
},
cancel : function() {
},
error : function(error) {
var message;
if (error.code == Ti.Media.NO_CAMERA) {
message = 'Device does not have video recording capabilities';
} else {
message = 'Unexpected error: ' + error.code;
}
Ti.UI.createAlertDialog({
title : 'Camera',
message : message
}).show();
},
saveToPhotoGallery : true,
allowEditing : true,
mediaTypes : [Ti.Media.MEDIA_TYPE_VIDEO,Ti.Media.MEDIA_TYPE_PHOTO]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment