NativeScript / nativescript-background-http

Background Upload plugin for the NativeScript framework
Apache License 2.0
101 stars 50 forks source link

Unable to disable notifications on Android Orio for latest plugin version #148

Closed geoffbullen closed 6 years ago

geoffbullen commented 6 years ago

Which platform(s) does your issue occur on?

Please, tell us how to recreate the issue in as much detail as possible.

Using latest version (3.2.7) and android api v27, and setting androidDisplayNotificationProgress: false, you get the below 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 only way I have found that I can avoid this issue is to allow notifications.

tgpetrov commented 6 years ago

@geoffbullen, This behaviour is expected. It is due to the new Android requirement that developers must use notifications when running background tasks. Check this article for more information.

geoffbullen commented 6 years ago

Thanks @tgpetrov.

OK, thats a shame as I am doing lots of upload requests, so going to be a bit annoying for the user...

But thank you for the explanation.