Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20533] Ti.Android.Intent is not working properly

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2018-05-16T22:50:07.000+0000
Affected Version/sRelease 5.2.0
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterCREATIVE KAIZEN
AssigneeJoshua Quick
Created2016-03-08T09:39:25.000+0000
Updated2018-05-16T22:50:07.000+0000

Description

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

Attachments

FileDateSize
.log2016-03-08T09:40:27.000+00009095070
1. screen.png2016-03-08T09:40:33.000+0000134625
1. shared.png2016-03-08T09:40:30.000+000059416

Comments

  1. Joshua Quick 2018-05-16

    This issue was resolved in Titanium 6.3.0. See: [TIMOB-25439]

JSON Source