{ "id": "62543", "key": "TIMOB-1911", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "12095", "description": "", "name": "Sprint 2012-03", "archived": true, "released": true, "releaseDate": "2012-02-12" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-02-10T19:50:29.000+0000", "created": "2011-04-15T03:05:22.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "feature" ], "versions": [], "issuelinks": [ { "id": "15147", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "85137", "key": "TIMOB-7293", "fields": { "summary": "Android: App Freeze after being too much time in the background", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "15122", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "85137", "key": "TIMOB-7293", "fields": { "summary": "Android: App Freeze after being too much time in the background", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "17740", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "92315", "key": "TIMOB-9229", "fields": { "summary": "Android: Certain devices aren't able to survive on activity relaunch - splash screen hangs", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-03-24T21:01:49.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}
Because of the cleanup code in TiUIWindow (see\r\nrelease()
), Titanium apps can't survive an activity\r\nrelaunch. Even the simplest app:
\r\n/*global Ti, Titanium, alert, JSON */\r\nTitanium.UI.setBackgroundColor('#000');\r\nTitanium.UI.createWindow({ \r\n title:'Test',\r\n backgroundColor:'#fff',\r\n fullscreen: true,\r\n exitOnClose: true\r\n}).open();
\r\n
\r\nTo cause an activity relaunch, change the locale while the\r\nactivity is running. Example:
\r\nOpen a titanium app.
\r\nKeeping it open (i.e., don't back out), hit your Home key.
\r\nGo to Settings -> Language & Keyboard -> Select\r\nlanguage, then change the language.
\r\nGo back to the Titanium app -- it will crash.
\r\nWhat's happening can be shown in the attached\r\nrelaunch_activity.png graphic. Apparently Android forces the\r\nactivity to relaunch if the locale has changed. This causes\r\nonDestroy
, which in our code results in the window\r\ncleaning up itself, but then activity create occurs again. Now the\r\nhandler
object is null, however, and all views are\r\ngone.
Is there some way for us to determine if onDestroy
\r\nis occurring because of a relaunch?
Assigning to Don for milestone/priority.
Need to add locale
to the list of things we handle\nin the activity definitions in the AndroidManifest.xml see \nAndroid Docs
What I'm not clear of is if we should fire a\nlocaleChange
event to the activity. It might be a good\nthing to do.