[TIMOB-26636] Android: Remove deprecated "newIntent" event in favor of "newintent"
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-01-04T21:17:46.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 8.0.0 |
Components | Android |
Labels | android, breaking-change, intent, intent-filter |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2018-12-08T04:51:37.000+0000 |
Updated | 2019-01-07T19:35:23.000+0000 |
Description
*Summary:*
The
Ti.Android.Activity
object currently supports events "newIntent" and "newintent". The "newIntent" event was deprecated in the past in favor of "newintent" with a lower-case 'i'. We should remove it in Titanium 8.0.0.
Ti.Android.currentActivity.addEventListener("newIntent", function(e) {
// This event is deprecated and should no longer be supported.
Ti.API.info("!!! Event 'newIntent' is deprecated. Should no longer be fired.");
});
Ti.Android.currentActivity.addEventListener("newintent", function(e) {
// This is the event name you should listen to.
Ti.API.info("### Event 'newintent' was received");
});
*Note:*
Ideally, we should log a warning when JS code attempts to add a listener to the deprecated "newIntent" event to avoid confusion/tech-support issues.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/10519
FR Passed. PR Merged.
Verified the fix on SDK 8.0.0.v20190107030906 . Works fine.