react-native-background-upload icon indicating copy to clipboard operation
react-native-background-upload copied to clipboard

Support for SDK 34

Open anindya2791 opened this issue 1 year ago • 9 comments

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

anindya2791 avatar Mar 12 '24 16:03 anindya2791

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.

mtshv avatar Jul 02 '24 18:07 mtshv

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: 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+

anindya2791 avatar Jul 16 '24 05:07 anindya2791

We are using this in RN 0.72.7 with SDK <= 34 so far no issues reported by users. Can we get this merged?

anindya2791 avatar Jul 16 '24 06:07 anindya2791

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

react-native-background-upload+6.6.0.patch

kevinmartin33 avatar Jul 22 '24 13:07 kevinmartin33

@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"

mtshv avatar Jul 22 '24 15:07 mtshv

hey @mtshv did you solve PERMISSION_DENIED problem ? and how ?

Abdelsattar avatar Aug 16 '24 11:08 Abdelsattar

@Abdelsattar @mtshv Read here: https://github.com/expo/expo/issues/26846#issuecomment-1929129620

NicTorgersen avatar Aug 26 '24 10:08 NicTorgersen

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!

mtshv avatar Sep 19 '24 14:09 mtshv