{ "id": "171694", "key": "TIMOB-26063", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-07-28T15:44:51.000+0000", "created": "2018-05-23T17:38:01.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [ { "id": "56551", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "169766", "key": "TIMOB-25277", "fields": { "summary": "get the exact PDF url from Titanium WebView API", "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": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "56552", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "171326", "key": "TIMOB-25868", "fields": { "summary": "Windows: Implement WebView.onlink callback", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-10-09T17:09:04.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h5. description\r\nCostumer is attempting to load a pdf for android using intents with webview. \r\nin the mobile app they are using webview control for displaying the remote web site by binding a URL. The web pages in the web site contains few pdf links. On click of normal hyperlinks, respective web page is being shown in the web view. Whereas, on tapping a pdf links, a blank window is getting opened in Android devices. In iOS it’s working fine and a PDF is showing.\r\n\r\nPer Jira WebView cannot disply PDF documents on Android. So they are using intents as a workaround to open the PDF link. The issue is that on click of the pdf link in the web view, they are unable to get the exact PDF url with any of Titanium WebView API methods or events\r\n\r\nThe customer was able to do it natively and open the PDF's with intents. \r\n\r\nh5. Request\r\nThe customer wants to know how to get the exact PDF link using the webview API or if there is a workaround they could use.\r\n\r\nh5. additional information \r\nattached are two apps. One is a titanium app and one is an android native application.\r\n[titanium app|https://axwaysoftware-my.sharepoint.com/personal/vvazquezmontero_axway_com/_layouts/15/guestaccess.aspx?guestaccesstoken=rsxSxfm51VH5t8MRm7YpDX1bHDfJfDfaycmtpKrlAEE%3d&docid=2_11a957eab95234b6ab84003e12f7b0b41&rev=1]", "attachment": [ { "id": "65198", "filename": "app.js", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2018-05-23T17:38:02.000+0000", "size": 826, "mimeType": "text/javascript" }, { "id": "65197", "filename": "app (1).js", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2018-05-23T17:38:02.000+0000", "size": 826, "mimeType": "text/javascript" }, { "id": "65196", "filename": "MyApplication_Android.zip", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2018-05-23T17:38:02.000+0000", "size": 947392, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: Implement WebView.onlink callback", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "439231", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/10180\r\n\r\nTest-Case:\r\n{code:js}\r\nvar window = Ti.UI.createWindow(),\r\n webView = Ti.UI.createWebView({\r\n url: 'https://india.gov.in/website-ministry-commerce-and-industry',\r\n onlink: function(e) {\r\n if (e.url.endsWith('.pdf')) {\r\n alert('PDF: ' + e.url);\r\n return false;\r\n }\r\n return true;\r\n }\r\n });\r\n\r\nwindow.add(webView);\r\nwindow.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-07-16T07:33:37.000+0000", "updated": "2018-07-16T07:33:37.000+0000" }, { "id": "441472", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix with SDK version {{7.5.0.v20180906093938.}} Able to get the exact link of a PDF when clicking on a link. \r\n\r\n*FR Passed (Test Steps):*\r\n# Created a new Titanium application\r\n# Added the code above in to the application\r\n# Installed app on to the device\r\n# Ran the app\r\n# Clicked on a .PDF link \r\n# able to see the exact link of the PDF which was clicked\r\n\r\n*Environment*\r\n{code:java}\r\nAPPC Studio: 5.1.0.201808080937\r\nAPPC CLI: 7.0.6\r\niphone 6 (12.0)\r\nOperating System Name: Mac OS High Sierra\r\nOperating System Version: 10.13.6\r\nNode.js Version: 8.9.1\r\nXcode 10.0 beta 6\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-11T13:42:08.000+0000", "updated": "2018-09-11T13:42:08.000+0000" }, { "id": "442454", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on SDK 7.5.0.v20181005164109. PDF link works fine. Closing\r\n{CODE}\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.13.6\r\n Architecture = 64bit\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\n SDK Version =7.5.0.v20181005164109\r\nDevice\t\t\t =Iphone 62 iOS 12\r\n\t\t\t\t\tiPhone 6 iOS 11 simulator\r\n{CODE}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-10-09T17:08:57.000+0000", "updated": "2018-10-09T17:08:57.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }