{ "id": "142902", "key": "AC-921", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2015-02-03T15:03:46.000+0000", "created": "2015-01-15T21:22:47.000+0000", "labels": [ "android" ], "versions": [], "issuelinks": [], "assignee": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "updated": "2016-03-08T07:37:13.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14550", "name": "Appcelerator Modules", "description": "Please enter tickets related to Modules here." } ], "description": "We are building a Notification for GCM and using an activity that is *not* the main, launcher activity (i.e. the activity that extends TiRootActivity) within the PendingIntent. This activity has no UI, but instead simply tracks some information regarding the notification being clicked and then launches the main, launcher activity from within its onCreate() method. Similar to the following: https://gist.github.com/deronbrown/d392418360b7c80fa57a\r\n\r\nThis works as expected most of the time. However, if the app is out of memory when the notification is tapped (i.e. show the GCM notification, open recent apps menu, remove app, then tap notification), the launch activity will not be shown. Instead, the user will see a quick flash of UI and then be dropped back to their previous state (e.g. home screen or wherever the user was when the notification was tapped).\r\n\r\nLogs show the proper intent to start the main activity but the activity never displays. This same bug does not appear if you use the main, launcher activity in the PendingIntent. Perhaps TiRootActivity is doing some specific Titanium setup, and when another activity is used this setup does not occur. We were not able to determine the important setup that our activity should be doing based on the TiRootActivity source that is available.\r\n\r\n*Test Case:*\r\n* Create TestActivity for PendingIntent: https://gist.github.com/deronbrown/a9e018762ddabb85f272\r\n* Show a notification using TestActivity in the PendingIntent: https://gist.github.com/deronbrown/939e4956effaa9528215\r\n* Once notification displays, open recent apps menu and swipe the Test app away. (Note: This is not the same as force closing).\r\n* Tap the notification to launch the application.\r\n\r\n*Expected:* TestActivity should be created, print to logcat, and launch the main activity which should be displayed to the user.\r\n*Actual:* TestActivity is created, prints to logcat, and the user is returned to their initial state before tapping notification. (Main Activity never displays.)\r\n", "attachment": [], "flagged": false, "summary": "Crash when launching root activity from another activity", "creator": { "name": "deronbrown", "key": "deronbrown", "displayName": "DeRon Brown", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "deronbrown", "key": "deronbrown", "displayName": "DeRon Brown", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "339379", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "HI,\r\n\r\nPlease provide a simple test case to reproduce your problem. That will be really helpful to address the problem. \r\n\r\nRegards,\r\nShuo", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2015-01-16T03:18:43.000+0000", "updated": "2015-01-16T03:18:43.000+0000" }, { "id": "339477", "author": { "name": "deronbrown", "key": "deronbrown", "displayName": "DeRon Brown", "active": true, "timeZone": "America/New_York" }, "body": "[~sliang] I have added a test case the end of the description.", "updateAuthor": { "name": "deronbrown", "key": "deronbrown", "displayName": "DeRon Brown", "active": true, "timeZone": "America/New_York" }, "created": "2015-01-16T19:52:53.000+0000", "updated": "2015-01-16T19:54:06.000+0000" }, { "id": "341827", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello,\r\nplease read this guide:\r\n\r\nhttp://docs.appcelerator.com/titanium/3.0/#!/guide/How_to_Submit_a_Bug_Report\r\n\r\nand provide a testcase in the form of app.js single file. \r\n\r\nBest Regards", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2015-02-03T15:03:46.000+0000", "updated": "2015-02-03T15:03:46.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }