Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26636] Android: Remove deprecated "newIntent" event in favor of "newintent"

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2019-01-04T21:17:46.000+0000
Affected Version/sn/a
Fix Version/sRelease 8.0.0
ComponentsAndroid
Labelsandroid, breaking-change, intent, intent-filter
ReporterJoshua Quick
AssigneeJoshua Quick
Created2018-12-08T04:51:37.000+0000
Updated2019-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.

Comments

  1. Joshua Quick 2018-12-12

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/10519
  2. Lokesh Choudhary 2019-01-04

    FR Passed. PR Merged.
  3. Keerthi Mahalingam 2019-01-07

    Verified the fix on SDK 8.0.0.v20190107030906 . Works fine.
       Operating System
         Name                        = Mac OS X
         Version                     = 10.13.6
         Architecture                = 64bit
       Node.js
         Node.js Version             = 8.12.0
         npm Version                 = 6.4.1
       Titanium CLI
         CLI Version                 = 5.1.1
       Titanium SDK
         SDK Version                 = 8.0.0.v20190107030906
       Device                           = Samsung s5 os 6 
       Simulator                      = pixel android 7 
       

JSON Source