Commit Graph

4 Commits

Author SHA1 Message Date
Scott Mathson 2114a9b327 feat(Android Webview): Add file download support for Android (#203)
Addresses #80.

Caveat: I am not an Android developer. This code comes from a fork of the original RN WebView that we have been using in production for some time, so all credit goes to @Oblongmana: https://github.com/Oblongmana/react-native-webview-file-upload-android.

Setting up a DownloadManager for the WebView is pretty straightforward, as is adding any known cookies to the request. Most of the complication comes from the requirement after SDK 23 to ask the user for the WRITE_EXTERNAL_STORAGE permission. Unfortunately there is no mechanism to suspend the download request until permission is resolved so this code stores off the request and sets up a listener that enqueues the download once permissions are resolved so the user experience is really nice.

I didn't see anything in the way of tests or documentation that needs to be added for this change, so let me know if I missed anything. Thanks!
2019-01-07 15:02:47 +01:00
Andrei Pfeiffer 752a5b295a feat(Android): Support Android file upload (#60)
Fixes #33 

I could really use some help from an Android developer on this one, because I just "made it work", don't know how to "make it work good".

Some things that should be reviewed:

- [ ] validate Android 5.0 devices (my emulator work, but outputs some weird sounds; a Galaxy 4 I tested on crashes)
- [ ] validate Android 5.1 devices (emulator works, couldn't find a real device)
- [ ] how to handle File Extensions? (https://www.w3schools.com/tags/att_input_accept.asp)

I'm sure that there's more refactoring to be done, so any help and advice would be appreciated.
2018-11-21 11:46:43 +01:00
Jamon Holmgren 935e9518ee Docs updates 2018-09-19 21:20:56 -07:00
Jamon Holmgren 0ce93a963a Added first draft of docs folder and documentation 2018-09-19 19:27:09 -07:00