Steps to Reproduce
var filename = 'someImage.jpg';
var file = Titanium.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, filename);
var window = Ti.UI.createWindow({
backgroundColor: 'white'
});
var imageView = Ti.UI.createImageView({
top: 0,
width: '100%',
image: file.nativePath
});
var shareButton = Ti.UI.createView({
height: 100,
width: 200,
backgroundColor: 'purple',
bottom: 0,
});
window.add(imageView);
window.add(shareButton);
shareButton.addEventListener('click', function() {
alert('shareClick');
var shareIntent = Ti.Android.createIntent({
action: Ti.Android.ACTION_SEND,
type: "image/jpeg"
});
shareIntent.putExtra(Ti.Android.EXTRA_TITLE, 'title');
shareIntent.putExtra(Ti.Android.EXTRA_TEXT, 'text');
shareIntent.putExtraUri(Ti.Android.EXTRA_STREAM, file.nativePath);
Ti.Android.currentActivity.startActivity(Ti.Android.createIntentChooser(shareIntent, 'share'));
});
window.open();
Actual Result
.putExtra() and .putExtraUri() is not working properly because EXTRA_TEXT, EXTRA_TITLE, EXTRA_STREAM is not showing in app - fields (text, title) are blank, and shared image is blank (Facebook, Messages - 1. shared.png) or application is returning message that it was impossible to read image.
It's a new bug (AS 4.5.0) because this function was working properly in earlier version.
Everything is fine with image because it is showing in the app. (1. screen.png)
Expected Result
Removing bug. It is blocking whole share functionality
This issue was resolved in Titanium 6.3.0. See: [TIMOB-25439]