{ "id": "174938", "key": "TIMOB-27862", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "20950", "name": "Release 9.1.0", "archived": false, "released": true, "releaseDate": "2020-08-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-07-29T21:07:46.000+0000", "created": "2020-04-22T00:29:23.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "callback", "openUrl", "parity" ], "versions": [], "issuelinks": [ { "id": "58345", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "174937", "key": "TIMOB-27861", "fields": { "summary": "iOS: openURL() callback not invoked if missing options dictionary as of 8.1.0", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-07-29T21:07:46.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": "*Summary:*\r\nOn Android, the {{Ti.Platform.openURL()}} method only supports the URL argument. The 2 optional arguments, \"options\" dictionary and callback, are ignored and only supported on iOS.\r\nhttps://docs.appcelerator.com/platform/latest/#!/api/Titanium.Platform-method-openURL\r\n\r\nWe should add support for the callback argument for consistency with iOS.\r\n{code:javascript}\r\n// Add support for the callback argument.\r\nvar result = Ti.Platform.openURL(\"https://www.google.com\", function(e) {\r\n\tTi.API.info(\"### openURL() callback event.success: \" + e.success);\r\n});\r\n\r\n// We should still support returned boolean for backward compatibility.\r\nTi.API.info(\"### openURL() returned: \" + result);\r\n{code}\r\n\r\n*Note:*\r\nThe \"options\" dictionary should continue to be ignored since it only supports iOS settings. Meaning that the below should work on Android without issue.\r\n{code:javascript}\r\nvar result = Ti.Platform.openURL(\"https://www.google.com\", {/* Ignore Me */}, function(e) {\r\n\tTi.API.info(\"### openURL() callback event.success: \" + e.success);\r\n});\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: Add callback support to Ti.Platform.openURL()", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "455292", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/11668", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-04-29T00:59:32.000+0000", "updated": "2020-04-29T00:59:32.000+0000" }, { "id": "455443", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-05-13T00:51:19.000+0000", "updated": "2020-05-13T00:51:19.000+0000" }, { "id": "456273", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified on:\r\nMac OS: 10.15.4\r\nSDK: 9.1.0.v20200727104531\r\nAppc CLI: 8.1.0-master.7\r\nJDK: 11.0.4\r\nNode: 10.17.0\r\nStudio: 6.0.0.202005141803\r\nDevice: Pixel3(v10.0) emulator", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-29T21:07:46.000+0000", "updated": "2020-07-29T21:07:46.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }