New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for Android API 29 and API 30 #646
Conversation
chaits98
commented
Aug 10, 2020
- Updated file access methods
- Updated gradle build tools version
- Updated gradle version
Thank you! This PR is really useful as Google Play requires app updates to target at least |
I have encountered a crash issue after merging this PR to my project. The crash title is
This crash occurs when I download multiple items one by one. |
@mrarronz I will fix this issue over the weekend and update the pr for the same. Can you please share a working example where you encountered this issue. |
@chaits98 Thank you very much! Sorry that I can't provide a working example due to security, my project downloads 3 items at once, I have a download page shows multiple download items, when user click "download all", all the items are added to a download queue, 3 items are allowed to download at the same time. After merging this PR, when I click "download all", the app crashes. And it works again after relaunch the app and continue downloading. I guess this crash is related to the okhttp library interceptor crash. Thank you again for your help! |
@mrarronz I will work on this then. Please disable the network inspector and try uploading or downloading files. This happens because network inspector forces the application to read from stream twice, first for network inspector and second time to write the file to storage, and the stream is closed after the first time it is read. Check function "pipeStreamToSink" in "RNFetchBlobBody.java" file. [stream.close() is called] Also, please check your implementation of network inspector or provide a code snippet so that I can help you better |
@chaits98 My project is totally a react native project, I have no implementation of network inspector for Android. Looking forward to your fixing on this, much appreciate your help! |
Title says SDK 29, but changes are for SDK 30. Typo? As far as I know, SDK 29 works fine right now. Either way, looking forward this change since we may see SDK 30 as a requirement soon. |
@cristianoccazinsp The changes are for Android SDK 29 only |
Got it, but in the files you've changed, you have bumped the SDK to 30. RN still uses SDK 29, any reason to upgrade to 30? |
Oh, my bad. |
Sadly, this repo may not be maintained anymore (#666), so until a new maintainer appears we may not see PRs merged anytime soon. What doesn't work exactly with SDK 29? I have been using SDK 29 and this library for a few months already without issues, but I wonder what isn't working and we haven't noticed or are not using. |
I'm sure that people will pitch in to support this library, let's see how this pans out over time. |
@chaits98 on Android 9 and lower versions |
@mrarronz I was unable to reproduce your previous issue. For your query regarding seeing downloaded content: If you want to open the downloaded file from within your application, you can add the following flag to your intent |
Hey, |
This pull request works perfectly on android API 29 and API 30. Hope this PR will be merged to master soon |
Just migrate to https://github.com/RonRadtke/react-native-blob-util since this fork is pretty much dead. |
Thanks for the PR, It works like a charm, that PR should be merged 👍 |
@keremoge This repo is unmaintained. Please migrate to https://github.com/RonRadtke/react-native-blob-util. There all these changes and some more are implemented. |
@mrarronz Have you managed to fix interceptor crash? I experience it too. |
@noway See the screenshot below, this is how I fix the crash. |
Thanks |
awesome thanks @chaits98 I'm using Ron Radtke's fork atm and this is his fix. RonRadtke@6806822 I'm not 100% confident it fixes the issue, but i think it happens less? |
Sorry for the delay everyone. Fix https://github.com/RonRadtke/react-native-blob-util/commit/6806822d024c4684c14d11b371e8ae5e1f6f0f3b Also my fork works well with Android API 30 (Android 11). |