Skip to content

Support of Android 8.1 and above #164

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

Open
Diwei-Chen opened this issue Aug 22, 2019 · 4 comments
Open

Support of Android 8.1 and above #164

Diwei-Chen opened this issue Aug 22, 2019 · 4 comments

Comments

@Diwei-Chen
Copy link

Followed the solution as proposed in #59

After turning off the notification setting, now Android is throwing:

Error: Android Oreo requires a notification configuration for the service to run. https://developer.android.com/reference/android/content/Context.html#startForegroundService(android.content.Intent)

The targetSdkVersion in our android/app/build.gradle is 27 and compileSdkVersion is 28.

We found some solutions on stack overflow https://stackoverflow.com/questions/47531742/startforeground-fail-after-upgrade-to-android-8-1 but not sure if we're doing the right thing.

Any ideas, please?

Related documentation:
https://developer.android.com/reference/android/content/Context.html#startForegroundService(android.content.Intent)

@NicholasIoanJones
Copy link

We are having the same issue. @Diwei-Chen did you solve this satisfactorily? Could you share how?

Maintainers - would be good to include instructions for configuring this in Android > 8.1

@reime005
Copy link
Contributor

reime005 commented Nov 7, 2019

AFAIK it should be enough to enable the notification, by setting options: { notification: { enabled: true ... } when doing an upload

@Diwei-Chen
Copy link
Author

@NicholasIoanJones I am sorry to tell but without enough knowledge to help improve the Android code, we ended up with replacing this package with the fetch method in rn-fetch-blob in the sacrifice of background upload capability on Android.

@elgrones
Copy link

I solved my problem adding this line
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
in my android manifest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants