Project: titanium
Issue TIMOB-18146: Android: Cannot send Broadcast with data property defined in the intent
CAVEAT: Cannot tell if this should work or not. Cannot find any official information in the Android docs. Stackoverflow and other topics say you can only send data through extras, which does work in this example. REPRODUCTION: Run the code below in the Genymotion emulator and click the "Send Broadcast" button. RESULTS: Broadcast is not sent. OTHER INFO: Comment out line #9 (data property) and rerun the test. Intent is sent and received. {code} var win = Ti.UI.createWindow(); var button = Ti.UI.createButton({	title : 'Send Broadcast' }); button.addEventListener('click', function() {	var intent = Ti.Android.createBroadcastIntent({	action: 'com.appcelerator.action.ALERT',	data: 'http://www.appcelerator.com'	});	Ti.Android.currentActivity.sendBroadcast(intent); }); win.add(button); win.open(); var broadcastReceiver = Ti.Android.createBroadcastReceiver({	onReceived: function(e) {	Ti.API.info(JSON.stringify(e.intent));	} }); Ti.Android.registerBroadcastReceiver(broadcastReceiver, ['com.appcelerator.action.ALERT']); {code}
Story points: 5