Support for SDK 34
This should solve https://github.com/Vydia/react-native-background-upload/issues/343 Thanks @sandeep14
Summary
Test Plan
What's required for testing (prerequisites)?
What are the steps to reproduce (after prerequisites)?
Compatibility
| OS | Implemented |
|---|---|
| iOS | ✅❌ |
| Android | ✅❌ |
Checklist
- [x] I have tested this on a device and a simulator
- [ ] I added the documentation in
README.md - [ ] I updated the typed files (TS and Flow)
- [ ] I've added Detox End-to-End Test(s)
- [ ] I've created a snack to demonstrate the changes: LINK HERE
hey @anindya2791 I've implemented your changes and it indeed builds and works as expected. Thanks for your work (cc @sandeep14)
However, I have issues with uploading my APK to the google play store due to
"message": "You must let us know whether your app uses any Foreground Service permissions.",
"status": "PERMISSION_DENIED"
I think it might be related to the net.gotev:uploadservice-okhttp version bump: https://github.com/Vydia/react-native-background-upload/pull/347/files#diff-197b190e4a3512994d2cebed8aff5479ff88e136b8cc7a4b148ec9c3945bd65aR67
See this issue: https://github.com/gotev/android-upload-service/issues/660
If you guys have the same issue, or any ideas, how to solve it, please let me know.
hey @anindya2791 I've implemented your changes and it indeed builds and works as expected. Thanks for your work (cc @sandeep14)
However, I have issues with uploading my APK to the google play store due to
"message": "You must let us know whether your app uses any Foreground Service permissions.", "status": "PERMISSION_DENIED"I think it might be related to the
net.gotev:uploadservice-okhttpversion bump: https://github.com/Vydia/react-native-background-upload/pull/347/files#diff-197b190e4a3512994d2cebed8aff5479ff88e136b8cc7a4b148ec9c3945bd65aR67See this issue: gotev/android-upload-service#660
If you guys have the same issue, or any ideas, how to solve it, please let me know.
I think you need to declare the uses-permission in your AndroidManifest.xml
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
afaik, this is a play store mandate for Android 13+
We are using this in RN 0.72.7 with SDK <= 34 so far no issues reported by users. Can we get this merged?
To solve the FOREGROUND_SERVICE_DATA_SYNC error on the playstore I have use the work of tomit87 he moved service to worker And I applied to this library
@kevinmartin33 thank you so much for sharing your solution for this problem! Will try your suggested approach <3
@anindya2791 thank you for the response, unfortunately explicitly declaring android.permission.FOREGROUND_SERVICE nor android.permission.FOREGROUND_SERVICE_DATA_SYNC did not resolve the issue.
both permission declarations still result in:
"message": "You must let us know whether your app uses any Foreground Service permissions.",
"status": "PERMISSION_DENIED"
hey @mtshv did you solve PERMISSION_DENIED problem ? and how ?
@Abdelsattar @mtshv Read here: https://github.com/expo/expo/issues/26846#issuecomment-1929129620
hey @Abdelsattar In the end I provided the reasoning for the foreground permission usage to google reviewers as well as video showcasing the upload functionality. It worked. Looks like this was 1-time thing.
I crafted my explantion text based on this comment: https://github.com/gotev/android-upload-service/issues/660#issuecomment-2273465855
Good luck!