Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
intent.putExtra('company', 'Appcelerator');
return intent;
})()
}
]
},
{
title: 'Images, Video, & Sound',
recipes: [
{
title: 'View image',
external: true,
intent: Ti.Android.createIntent({
action: Ti.Android.ACTION_VIEW,
type: 'image/jpeg',
data: externalFiles['titanium.jpg'].nativePath
})
},
{
title: 'Capture and view image',
external: true,
intent: (function() {
var intent = Ti.Android.createIntent({
action: "android.media.action.IMAGE_CAPTURE"
});
intent.putExtraUri('output', imageCaptureFile.nativePath);
return intent;
})(),
callback: function(e) {
if (imageCaptureFile.exists) {
var intent = Ti.Android.createIntent({
action: Ti.Android.ACTION_VIEW,
intent: (function() {
var intent = Ti.Android.createIntent({
action: Ti.Android.ACTION_SEND,
type: 'image/jpeg'
});
intent.putExtraUri(Ti.Android.EXTRA_STREAM, externalFiles['titanium.jpg'].nativePath);
return intent;
})()
},