[GitHub] cordova-plugin-inappbrowser issue #221: CB-12834: (android) Fix bug when ope...
Github user infil00p commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/221 CRAP, this was a typo. @RafaelKr can you re-open this one? I meant to close #201 --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-inappbrowser issue #221: CB-12834: (android) Fix bug when ope...
Github user adirel commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/221 Thank you. great work --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-inappbrowser issue #221: CB-12834: (android) Fix bug when ope...
Github user RafaelKr commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/221 Hi @adirel, of course this `let` must be changed to `var`. Thank you! --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-inappbrowser issue #221: CB-12834: (android) Fix bug when ope...
Github user adirel commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/221 Hi @RafaelKr, Few points about old devices. the app crash whith error on line 109 at In: cordova-plugin-inappbrowser\www\inappbrowser.js **the code:** + let windowFeatures = { +width: isNumeric(size.width) ? size.width : null, +height: isNumeric(size.height) ? size.height : null + }; **error recived:** D/SystemWebChromeClient( 8784): file:///android_asset/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js: Line 109 : Uncaught SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode I/chromium( 8784): [INFO:CONSOLE(109)] "Uncaught SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode", source: file:///android_asset/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js (109) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-inappbrowser issue #221: CB-12834: (android) Fix bug when ope...
Github user adirel commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/221 @RafaelKr, Just wanted to let you know that we've tested your branch. Great work! --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-inappbrowser issue #221: CB-12834: (android) Fix bug when ope...
Github user MeirBon commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/221 @RafaelKr Don't have the time right now to work on this. Feel free to make a pull request to my fork and I will take a look when I have time. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-inappbrowser issue #221: CB-12834: (android) Fix bug when ope...
Github user RafaelKr commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/221 This is awesome! But can you please change the function `processDownload` like this? ```Java import android.webkit.CookieManager; [...] protected void processDownload() { final String url = InAppBrowserDownloads.this.url; final String cookie = CookieManager.getInstance().getCookie(url); final String filename = URLUtil.guessFileName(url, InAppBrowserDownloads.this.contentDisposition, InAppBrowserDownloads.this.mimetype); DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url)); request.addRequestHeader("Cookie", cookie); request.addRequestHeader("User-Agent", InAppBrowserDownloads.this.userAgent); request.addRequestHeader("Referer", url); request.allowScanningByMediaScanner(); // Notify client once download is completed! request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, filename); try { DownloadManager dm = (DownloadManager) plugin.cordova.getActivity().getSystemService(DOWNLOAD_SERVICE); dm.enqueue(request); Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); // This is important! intent.addCategory(Intent.CATEGORY_OPENABLE); // CATEGORY.OPENABLE intent.setType("*/*"); // any application, any extension Toast.makeText(plugin.cordova.getActivity().getApplicationContext(), "Downloading File '" + filename + "'", Toast.LENGTH_LONG).show(); } catch (Exception exception) { Toast.makeText(plugin.cordova.getActivity().getApplicationContext(), "Error downloading file, missing storage permissions", Toast.LENGTH_LONG).show(); exception.printStackTrace(); } } ``` This passes the cookies from the WebView to the DownloadManager, so you're able to download files from locations where you need to be signed in. I also cleaned up the code a little bit. The important code I added is this part: ```Java import android.webkit.CookieManager; [...] final String cookie = CookieManager.getInstance().getCookie(url); // Note that I defined the variable url before [...] request.addRequestHeader("Cookie", cookie); request.addRequestHeader("User-Agent", InAppBrowserDownloads.this.userAgent); request.addRequestHeader("Referer", url); [...] ``` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-inappbrowser issue #221: CB-12834: (android) Fix bug when ope...
Github user adirel commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/221 I join this request. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-inappbrowser issue #221: CB-12834: (android) Fix bug when ope...
Github user alanhg commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/221 Please publish the official version v1.7.2 as soon as possible. I need to implement download file like pdf or doc . --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-inappbrowser issue #221: CB-12834: (android) Fix bug when ope...
Github user cordova-qa commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/221 Cordova CI Build has completed successfully. **Commit** - [Link](https://github.com/apache/cordova-plugin-inappbrowser/pull/221/commits/d246092d1a066160aa4f3a4e5424b255d1550076) **Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/145/) 36 tests run, 0 skipped, 0 failed. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org