{ "id": "87115", "key": "TIMOB-7843", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": "12097", "description": "", "name": "Sprint 2012-05", "archived": true, "released": true, "releaseDate": "2012-03-11" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-03-12T08:09:09.000+0000", "created": "2012-02-28T13:32:04.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "module_android", "qe-testadded" ], "versions": [ { "id": "12571", "description": "CI for 1_7_X", "name": "Release 1.7.6", "archived": true, "released": false }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [ { "id": "15776", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "88003", "key": "TIMOB-8029", "fields": { "summary": "Android: Kindle Fire bad behavior when installing the app manually launching apk from sdcard (1_7_X)", "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 } } } } ], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-03-15T09:44:59.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": "h2. Problem description\r\nOn Kindle Fire there might be multiple instances of the app after installing manually from the SDCARD\r\n\r\nh2. Steps to reproduce\r\nBuild a default app from Studio\r\n{code:land=javascript}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\n\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'Tab 1',\r\n window:win1\r\n});\r\n\r\nvar label1 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'I am Window 1',\r\n\tfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\ttextAlign:'center',\r\n\twidth:'auto'\r\n});\r\n\r\nwin1.add(label1);\r\n\r\n//\r\n// create controls tab and root window\r\n//\r\nvar win2 = Titanium.UI.createWindow({ \r\n title:'Tab 2',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab2 = Titanium.UI.createTab({ \r\n icon:'KS_nav_ui.png',\r\n title:'Tab 2',\r\n window:win2\r\n});\r\n\r\nvar label2 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'I am Window 2',\r\n\tfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\ttextAlign:'center',\r\n\twidth:'auto'\r\n});\r\n\r\nwin2.add(label2);\r\n\r\n\r\n\r\n//\r\n// add tabs\r\n//\r\ntabGroup.addTab(tab1); \r\ntabGroup.addTab(tab2); \r\n\r\n\r\n// open tab group\r\ntabGroup.open();\r\n\r\n{code}\r\n\r\n1. Copy the app.apk included in ~/Titanium Studio Workspace/testKindle/build/android/bin on the Kindle SDCARD\r\n2. From the device, manually run the APK (using any file manager app available): app is being installed, restarted and run\r\n3. Click on Tab2, then click on Home button. Open again the app.\r\nResult: a new instance of the app is openend, displaying Tab1 window.\r\n4. Click on the back button\r\nResult: screen relative to the previous instance is being shown.\r\n\r\n5. Click again on back button and finally close the app. Start again the app.\r\nResult: after the app is being closed and restarted, the app behaves correctly and the issue is no longer reproducible.\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Kindle Fire bad behavior when installing the app manually launching apk from sdcard", "creator": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android Kindle Fire & Android 3.0+ devices\r\nTiSDK all versions", "comment": { "comments": [ { "id": "184912", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "I don't have a Kindle to test on, but as the description says it happens with \"Android 3.0+ devices\", I've tested with 1.7.5, 1.8.1 and the master branch (2.0.0) on a T-Mobile G-Slate (Android 3.1) but also on an older device, an HTC Desire running Android 2.2.\r\n\r\nI'm not able to reproduce the problem. These are my precise testing steps:\r\n\r\n1) Copy app.apk to the sdcard.\r\n\r\n2) Using the ASTRO File Manager, locate the app.apk on the sdcard, tap it and select \"Install\".\r\n\r\n3) When the install is complete select \"Open\".\r\n\r\n4) The application launches. In Android 2.2, it gives the warning that the application should be re-launched (android bug 2373, lack of the CATEGORY_LAUNCHER intent category, a known issue with built-in workaround). Does not occur in Android 3.1. So in Android 2.2, I go head and let it re-launch as directed.\r\n\r\n5) I select Tab 2.\r\n\r\n6) I tap the Home button.\r\n\r\n7) On Android 3.1, I tap the running apps button and re-select the app to bring it forward again. On Android 2.2, I long press the home key to bring up the recent apps list, then select the app to bring it forward again.\r\n\r\n8) When the app comes forward, it is still on Tab 2.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-03-02T13:09:12.000+0000", "updated": "2012-03-02T13:09:12.000+0000" }, { "id": "184913", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Please list specifically the devices (and their android versions) this behavior has been seen on (beyond the Fire).", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-03-02T13:10:27.000+0000", "updated": "2012-03-02T13:10:27.000+0000" }, { "id": "184920", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "If i alter my test step 7 on Android 3.1 by using the application menu to re-open the app (rather than the running apps button), I see the described behavior.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-03-02T13:40:47.000+0000", "updated": "2012-03-02T13:40:47.000+0000" }, { "id": "185137", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "With this change, we now detect [Android bug 2373|http://code.google.com/p/android/issues/detail?id=2373] in Honeycomb and above (3.0+) accurately as well (we have detected it in <3.0 for a long time now.)\r\n\r\nNote that the described behavior (the fail case) is true of *all* Android applications, not just ones created in Titanium. Android bug 2373 has been around for a long time and remains unaddressed by Google. It's not clear if they consider it a bug at all. We offer a workaround for it, which is to force the application to re-start when opened by the Android application installer.\r\n\r\nFor ways to customize the message that the user receives when the application is forced to re-launch after installation, see the Wiki page re tiapp.xml:\r\n\r\nhttps://wiki.appcelerator.org/display/guides/tiapp.xml+and+timodule.xml+Reference\r\n\r\n(search for \"2373\" on that page to jump to the section on this bug.)\r\n", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-03-06T05:35:31.000+0000", "updated": "2012-03-06T05:35:31.000+0000" }, { "id": "185173", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Pull request ready\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/1568", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-03-06T10:24:31.000+0000", "updated": "2012-03-06T10:24:31.000+0000" }, { "id": "185910", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Added a second PR for this: https://github.com/appcelerator/titanium_mobile/pull/1636", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-11T14:11:41.000+0000", "updated": "2012-03-11T14:11:41.000+0000" }, { "id": "186260", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as Fixed.\r\n\r\nSDK: 2.0.0.v20120312213243\r\nAndroid: V8, Rhino\r\nStudio: 2.0.0.201203121914\r\nOS: Snow Leopard\r\nDevices Tested: Nexus One 2.2.2, Kindle Fire 6.2.2, Xoom 3.2.1, Galaxy Nexus 4.0.2", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-13T12:05:16.000+0000", "updated": "2012-03-13T12:05:16.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }