{ "id": "97766", "key": "TIMOB-10077", "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": [], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-03-19T16:22:29.000+0000", "created": "2012-07-23T08:02:31.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "exalture" ], "versions": [], "issuelinks": [], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2017-03-21T21:26:03.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\nWhen a user selects an image and he shares this with the app, the correct window opens and the app is fully functional. But when the app is closed, it seems to reboot and hangs in the startup screen.\r\n\r\nh2. Steps to reproduce\r\n1. Edit tiapp.xml adding the following sections:\r\n{code:title=tiapp.xml}\r\n \r\n 8\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n false\r\n 500\r\n 0\r\n true\r\n 32768\r\n De applicatie dient na installatie opnieuw opgestart te worden\r\n Succesvol geinstalleerd\r\n Ga verder\r\n v8\r\n false\r\n false \r\n{code}\r\n\r\n2. Create an app.js with the following code:\r\n{code:title=app.js}\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\nvar hasIntent = false;\r\nvar intentData = null;\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\n\r\n\tvar intent = Ti.Android.currentActivity.getIntent();\r\n\tvar iname = Ti.Android.EXTRA_STREAM;\r\n\r\n\tif (intent && intent.hasExtra(iname)) {\r\n\t\thasIntent = true;\r\n\t intentData = intent.getBlobExtra(iname);\r\n\t Ti.API.info(intent);\r\n\t}\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\n\r\nif(hasIntent)\r\n{\r\n\tlabel1.text = 'We have an intent.. do something!';\r\n\t\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{code}\r\n\r\n3. Run the app once\r\n4. Close the app, open the gallery\r\n5. Share one picture with the app\r\n6. The app opens correctly: close it\r\n\r\nh2. Current result\r\nThe app seems to reload and crash.", "attachment": [], "flagged": false, "summary": "Android: app crashes when intent.SEND is called and the main app closed", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "208861", "author": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "body": "The problem seems to be present only with the TabGroups enabled. The following code works well:\r\n\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff',\r\n exitOnClose: true\r\n});\r\n\r\nvar hasIntent = false;\r\nvar intentData = null;\r\n// create tab group\r\n\r\nvar intent = Ti.Android.currentActivity.getIntent();\r\nvar iname = Ti.Android.EXTRA_STREAM;\r\n\r\nif (intent && intent.hasExtra(iname)) {\r\n\thasIntent = true;\r\n intentData = intent.getBlobExtra(iname);\r\n Ti.API.info(intent);\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\nif(hasIntent)\r\n{\r\n\tlabel1.text = 'We have an intent.. do something!';\t\r\n}\r\n\r\nwin1.add(label1);\r\n\r\nwin1.open();\r\n{code}", "updateAuthor": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-07-23T08:04:36.000+0000", "updated": "2012-07-23T08:04:36.000+0000" }, { "id": "208868", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Davide - We need complete environment information to diagnose this issue.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-23T08:48:56.000+0000", "updated": "2012-07-23T08:48:56.000+0000" }, { "id": "242920", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Tried with SDK 3.2.1, works without any crash.", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-03-19T16:22:29.000+0000", "updated": "2013-03-19T16:22:29.000+0000" }, { "id": "414442", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T21:26:03.000+0000", "updated": "2017-03-21T21:26:03.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }