{ "id": "121201", "key": "TIMOB-15487", "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": "15939", "description": "2014 Sprint 07", "name": "2014 Sprint 07", "archived": true, "released": true, "releaseDate": "2014-04-11" }, { "id": "15940", "description": "2014 Sprint 07 SDK", "name": "2014 Sprint 07 SDK", "archived": true, "released": true, "releaseDate": "2014-04-11" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2014-04-03T19:15:39.000+0000", "created": "2013-10-15T02:04:38.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam" ], "versions": [ { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" } ], "issuelinks": [ { "id": "36316", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "114912", "key": "TIMOB-13980", "fields": { "summary": "Android: allow getting the activity object for preferences panel", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "34426", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "123698", "key": "TIMOB-15982", "fields": { "summary": "Android: Integrate v7 of appcompat libraries", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "34507", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "118800", "key": "TIMOB-15021", "fields": { "summary": "Android: Use new ActionBar compatibility in Android Support Library 18 to enable ActionBar on all Android versions", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T22:53:44.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": "h4. Problem Description\r\nCustomer requieres to be able to set the activity name related to a heavyweight window, so he can refer to it from an external android native module. \r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Being able to name the activity related to a heavyweight window", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": null, "comment": { "comments": [ { "id": "299393", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We think that TiJSActivity is the correct short-term solution. We will revisit this as part of Ti.Next, as it requires breaking changes to the API.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-31T21:35:29.000+0000", "updated": "2014-03-31T21:35:29.000+0000" }, { "id": "299774", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "The Current Titanium Windowing system is view centric. Although every heavyweight window creates a new Activity, the activity is one of two classes TiActivity and TiTranslucentActivity.\r\n\r\nThere are two workarounds to this issue.\r\n\r\n1. Create a native Android Activity and launch it through proper intents. The drawback of this method of course would be that you would not get a built in JS bridge.\r\n2. Launch activities associated with java script files (Commonly referred to as JSActivity). The usage of the JSActivity is similar to the `url` parameter of the Ti.UI.Window class.\r\n \r\nPlease note that the JSActivity thus created has no specific theme and will inherit the application theme. To determine the exact class name see the generated Android Manifest file in the build folder. To overwrite the default activity setting add corresponding entries to the tiapp.xml for the generated activity.\r\n\r\nThe steps required to create and use a JS activity are as follows.\r\n\r\n1. Add an entry to the tiapp.xml to declare the activity. In the android section of tiapp.xml add something similar to the entry below\r\n{code}\r\n\r\n \r\n\r\n{code}\r\n2. Create an intent to launch the activity associated with the JS file. Example below\r\n{code}\r\nvar intent = Ti.Android.createIntent({\r\n action: Ti.Android.ACTION_VIEW,\r\n url: 'myActivity.js'\r\n});\r\n{code}\r\n3. Launch the intent with the top most activity\r\n\r\nFull code example shown below\r\n{code}\r\n*************************\r\nFile : app.js\r\n*************************\r\nvar win = Ti.UI.createWindow({ title: 'JS ACTIVITIES',exitOnClose:true,backgroundColor:'white'});\r\n \r\nvar b1 = Ti.UI.createButton({title:'START myActivity1'});\r\n\r\nb1.addEventListener('click',function(e) {\r\n\tTi.API.info('GOT CLICK. CREATING INTENT');\r\n\tvar intent = Ti.Android.createIntent({\r\n\t action: Ti.Android.ACTION_VIEW,\r\n\t url: 'myActivity.js'\r\n\t});\r\n\tTi.API.info('STARTING ACTIVITY');\r\n\twin.activity.startActivity(intent);\r\n});\r\n\r\n\r\nwin.add(b1);\r\n\r\nwin.open();\r\n*************************\r\nFile : myActivity.js\r\n*************************\r\nvar activity = Ti.Android.currentActivity;\r\nvar win1 = Ti.UI.currentWindow;\r\nvar button = Ti.UI.createButton({title:'Open Me Again'});\r\nwin1.add(button);\r\n\r\n\r\nbutton.addEventListener('click',function(e) {\r\n\tTi.API.info('GOT CLICK. CREATING INTENT');\r\n\tvar intent = Ti.Android.createIntent({\r\n\t action: Ti.Android.ACTION_VIEW,\r\n\t url: 'myActivity.js'\r\n\t});\r\n\tTi.API.info('STARTING ANOTHER INSTANCE OF MYSELF');\r\n\tactivity.startActivity(intent);\r\n});\r\n\r\n\r\n\r\nactivity.addEventListener(\"create\", function(e) {\r\n\tTi.API.info('IN CREATE OF myActivity');\t\r\n});\r\n\r\nactivity.addEventListener(\"destroy\", function(e) {\r\n\tTi.API.info('IN DESTROY OF myActivity');\t\r\n});\r\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-04-03T19:10:17.000+0000", "updated": "2014-04-03T19:14:31.000+0000" }, { "id": "415172", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Won't Fix\".", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T22:53:44.000+0000", "updated": "2017-03-22T22:53:44.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }