You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/03/18 18:58:14 UTC

[GitHub] [cordova-plugin-inappbrowser] yesenarman opened a new pull request #647: feat(android): Ask for file permission when opening a download link (CB-12834) (rebased)

yesenarman opened a new pull request #647: feat(android): Ask for file permission when opening a download link (CB-12834) (rebased)
URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/647
 
 
   <!--
   Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines:
   
   http://cordova.apache.org/contribute/contribute_guidelines.html
   
   Thanks!
   -->
   
   ### Platforms affected
   
   Android
   
   ### Motivation and Context
   <!-- Why is this change required? What problem does it solve? -->
   <!-- If it fixes an open issue, please link to the issue here. -->
   
   See #201 and #204.
   
   ### Description
   <!-- Describe your changes in detail -->
   
   I wanted to bring back attention to apache/cordova-plugin-inappbrowser#244, but noticed that the original PR contains some merge conflicts and is quite behind the master branch. I also noticed that there are a lot of formatting changes in that PR that are not quite related to the added feature, so thought that maybe creating a new PR without the formatting changes will make it easier to review and merge.
   
   This PR also contains the cookies passing improvement by @RafaelKR.
   
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   
   - Tested in the app where I needed to have this feature.
     - It asks for the file storage permissions when you try to download a file for the first time.
     - If the permissions were given, it shows a toast with a message that the file download started. You can observe the download progress through notification drawer and you can also cancel the download from there.
     - If the permissions were not given, it shows a toast with an error message.
   
   - Followed the testing instructions from CONTRIBUTING.md
     - Auto Tests completed successfully.
     - There were some issues with Manual Tests on my device, but it seems that same issues also happen when compiling from upstream master branch.
   
   ### Checklist
   
   - [x] I've run the tests to see all new and existing tests pass
   - [ ] I added automated test coverage as appropriate for this change
   - [x] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)
   - [ ] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
   - [ ] I've updated the documentation if necessary
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] timbru31 commented on issue #647: feat(android): Ask for file permission when opening a download link (CB-12834) (rebased)

Posted by GitBox <gi...@apache.org>.
timbru31 commented on issue #647: feat(android): Ask for file permission when opening a download link (CB-12834) (rebased)
URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/647#issuecomment-601724159
 
 
   CI failure was unrelated and it's now green.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] yesenarman edited a comment on issue #647: feat(android): Ask for file permission when opening a download link (CB-12834) (rebased)

Posted by GitBox <gi...@apache.org>.
yesenarman edited a comment on issue #647: feat(android): Ask for file permission when opening a download link (CB-12834) (rebased)
URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/647#issuecomment-600836384
 
 
   Thanks. I think I don't have rights to request a review.
   
   > Maybe the Toast message text should be configurable (translatable).
   
   That's a good point.
   
   Should they be configurable via the options string? There are two things that concern me about passing them via options string:
   1. It is easy to forget to pass these strings every time you need to open IAB. Also the options string might become very long.
   2. The success message has this format currently "Downloading File '{filename}'". So should users be able to configure/translate just the "Downloading File" part or should they be able to specify the whole string formatting, including the {filename} substitution part?
   
   Another option would be to have these strings as Android String resources in `res/values/strings.xml` and then let users to provide translations by adding appropriate XML file with translated strings (e.g `res/values-ru/strings.xml`).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] yesenarman edited a comment on issue #647: feat(android): Ask for file permission when opening a download link (CB-12834) (rebased)

Posted by GitBox <gi...@apache.org>.
yesenarman edited a comment on issue #647: feat(android): Ask for file permission when opening a download link (CB-12834) (rebased)
URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/647#issuecomment-600836384
 
 
   Thanks. I think I don't have rights to request a review.
   
   > Maybe the Toast message text should be configurable (translatable).
   
   That's a good point.
   
   Should they be configurable via the options string? There are two things that concern me about passing them via options string:
   1. It is easy to forget to pass these strings every time you need to open IAB. Also the options string might become very long.
   2. The success message has this format currently "Downloading File '{filename}'". So should users be able to configure/translate just the "Downloading File" part or should they be able to specify the whole string formatting, including the {filename} substitution part?
   
   Another option would be to have these strings as Android String resources in `values/strings.xml` and then let users to provide translations by adding appropriate XML file with translated strings (e.g `values-ru/strings.xml`).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] RafaelKr commented on issue #647: feat(android): Ask for file permission when opening a download link (CB-12834) (rebased)

Posted by GitBox <gi...@apache.org>.
RafaelKr commented on issue #647: feat(android): Ask for file permission when opening a download link (CB-12834) (rebased)
URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/647#issuecomment-600807102
 
 
   Awesome work!
   If you're able to request a review, you should add @janpio 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] RafaelKr commented on issue #647: feat(android): Ask for file permission when opening a download link (CB-12834) (rebased)

Posted by GitBox <gi...@apache.org>.
RafaelKr commented on issue #647: feat(android): Ask for file permission when opening a download link (CB-12834) (rebased)
URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/647#issuecomment-600809545
 
 
   Maybe the Toast message text should be configurable (translatable).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] RafaelKr commented on issue #647: feat(android): Ask for file permission when opening a download link (CB-12834) (rebased)

Posted by GitBox <gi...@apache.org>.
RafaelKr commented on issue #647: feat(android): Ask for file permission when opening a download link (CB-12834) (rebased)
URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/647#issuecomment-600850358
 
 
   I think using Android String resources would be the best way.
   
   Defaults can be set in the plugin.xml like this: https://github.com/ionic-team/cordova-plugin-ionic/blob/63092070ca2e45564f0c4af0f8abda2f2e728b05/plugin.xml#L63 (Using strings instead of the variables, of course)
   The user can then overwrite/extend it for his languages in his config.xml by putting a `config-file` block into `<platform name="android">...</platform>`.
   
   The approach described here could be used to substitute the filename: https://stackoverflow.com/a/3656409/4303873

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] yesenarman commented on issue #647: feat(android): Ask for file permission when opening a download link (CB-12834) (rebased)

Posted by GitBox <gi...@apache.org>.
yesenarman commented on issue #647: feat(android): Ask for file permission when opening a download link (CB-12834) (rebased)
URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/647#issuecomment-600836384
 
 
   Thanks. I think I don't have rights to request a review.
   
   > Maybe the Toast message text should be configurable (translatable).
   
   That's a good point.
   
   Should they be configurable via the options string? There are two things that concern me about passing them via options string:
   1. It is also easy to forget to pass these strings every time you need to open IAB. Also the options string might become very long.
   2. The success message has this format currently "Downloading File '{filename}'". So should users be able to configure/translate just the "Downloading File" part or should they be able to specify the whole string formatting, including the {filename} substitution part?
   
   Another option would be to have these strings as Android String resources in `values/strings.xml` and then let users to provide translations by adding appropriate XML file with translated strings (e.g `values-ru/strings.xml`).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org