{ "id": "76541", "key": "TIMOB-4454", "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": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2020-01-09T19:12:45.000+0000", "created": "2011-06-18T16:13:26.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-01-09T19:12:45.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": "As reported by [this user in the Q&A|http://developer.appcelerator.com/question/121261/getarguments-returns-empty-string-on-android] and demonstrated in the following code, {{Ti.App.getArguments()}} returns an empty string.\r\n\r\n{code:title=app.js}\r\nvar args = Ti.App.getArguments();\r\nTi.API.debug('args is: ' + args);\r\nTi.API.debug('stringified args is: ' + JSON.stringify(args));\r\n\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : \"blue\",\r\n\texitOnClose:true\r\n});\r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Ti.App.getArguments() returns empty string", "creator": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": "* Titanium 1.7.1 (2011/06/17 00:13 293a6d...)\r\n* Android 2.1", "comment": { "comments": [ { "id": "165168", "author": { "name": "asghar.07", "key": "asghar.07", "displayName": "asghar ali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "any updates..", "updateAuthor": { "name": "asghar.07", "key": "asghar.07", "displayName": "asghar ali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-06T16:27:07.000+0000", "updated": "2011-09-06T16:27:07.000+0000" }, { "id": "167546", "author": { "name": "ym", "key": "ym", "displayName": "Y M", "active": true, "timeZone": "America/Los_Angeles" }, "body": "are there any work-arounds to this? or a fix locally?", "updateAuthor": { "name": "ym", "key": "ym", "displayName": "Y M", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-01T17:29:18.000+0000", "updated": "2011-10-01T17:29:18.000+0000" }, { "id": "167561", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is a carry over API from Desktop. It needs to be removed from the API on mobile. No arguments can be passed to a mobile application at launch.", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-02T18:32:17.000+0000", "updated": "2011-10-02T18:32:17.000+0000" }, { "id": "167564", "author": { "name": "ym", "key": "ym", "displayName": "Y M", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for the quick update, Don. \r\n\r\nHowever, this feature works in Appcelerator apps on iOS without issues (please do not remove it!!). Android also supports this feature natively through Intents, viz., getIntent().getData() returns the URI that started the current activity, which can be parsed to retrieve the parameters.\r\n\r\nRemoving this API would severely affect user experience, in that the ability to launch an app from a browser with a specific action request would not be available. Please reconsider.\r\n\r\nCheers.\r\n\r\nYM", "updateAuthor": { "name": "ym", "key": "ym", "displayName": "Y M", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-02T19:00:05.000+0000", "updated": "2011-10-02T19:00:05.000+0000" }, { "id": "167565", "author": { "name": "ym", "key": "ym", "displayName": "Y M", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Also, Don, please see the question posted in the Q&A for more details. Link is in the bug report above.\r\n\r\nThanks.", "updateAuthor": { "name": "ym", "key": "ym", "displayName": "Y M", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-02T20:16:07.000+0000", "updated": "2011-10-02T20:16:07.000+0000" }, { "id": "171139", "author": { "name": "jerodfritz", "key": "jerodfritz", "displayName": "Jerod Fritz", "active": true, "timeZone": "America/New_York" }, "body": "On Android I was able to get launch parameters read using code below but as of release 1.7.3 this no longer works:\r\n{code}\r\nvar currActivity = Titanium.Android.currentActivity;\r\nvar myIntent = currActivity.getIntent();\r\nvar cmd = myIntent.getData();\r\n{code}\r\n\r\nThat code now throws an exception on getData() because the currActivity.getIntent() returns null . Is this something that can be looked at?", "updateAuthor": { "name": "jerodfritz", "key": "jerodfritz", "displayName": "Jerod Fritz", "active": true, "timeZone": "America/New_York" }, "created": "2011-11-01T23:00:56.000+0000", "updated": "2011-11-01T23:02:33.000+0000" }, { "id": "242309", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Old ticket, but I just came across it. This works for me:\n\n{code}\nvar activity = Ti.Android.currentActivity;\nactivity.addEventListener(\"create\", function(e) {\n var args = activity.getIntent().getData();\n}\n{code}\n\n", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2013-03-14T21:02:51.000+0000", "updated": "2013-03-14T21:02:51.000+0000" }, { "id": "311148", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "@ingo you can close this one", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2014-06-26T20:02:59.000+0000", "updated": "2014-06-26T20:02:59.000+0000" }, { "id": "311235", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Should I be marking this \"fixed\"? If so, against which version?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-27T07:06:34.000+0000", "updated": "2014-06-27T07:06:34.000+0000" }, { "id": "311267", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "wontfix.... the ticket is that Ti.App.getArguments() doesn't work on android. In reality, it's iOS only: http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.App-method-getArguments\r\n\r\nOn android, you use Ti.Android.Intent.getData().", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2014-06-27T13:18:04.000+0000", "updated": "2014-06-27T13:18:04.000+0000" }, { "id": "322526", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Should we make Ti.App.getArguments() on Android call Ti.Android.Intent.getData()? Is there a reasonable cross-platform API we could promote?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-09T15:03:42.000+0000", "updated": "2014-09-09T15:03:42.000+0000" }, { "id": "322532", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "I don't think that a symbolic-link from one method to another is a good idea. Perhaps deprecating Ti.App.getArguments() and moving it to Ti.iOS namespace is a better option?", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2014-09-09T15:19:36.000+0000", "updated": "2014-09-09T15:19:36.000+0000" }, { "id": "322534", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Well, it doesn't have to be a symbolic link. It could be a new API. But I'm trying to get cross-platform parity where reasonable, and perhaps this is a place.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-09T15:31:12.000+0000", "updated": "2014-09-09T15:31:12.000+0000" }, { "id": "453558", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It has been decided that this issue should be closed as “Won’t do.” This issue is out of date with our current supported SDK release (7.5.2.GA as of the date of closure), and out of date with mobile OS versions. Updating, or creating code may not reproduce the issue reported, or be a valid test case.\r\n\r\nIf community members feel that the issue is still valid, please create a new ticket. Please reference this closed ticket number, include SDK used, comments, and code that demonstrates/reproduces the issue.", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-09T19:12:45.000+0000", "updated": "2020-01-09T19:12:45.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }