NativeScript / nativescript-background-http

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

support for android sdk 26 #126

Closed fthuin closed 6 years ago

fthuin commented 6 years ago

I was unable to use this plugin with Android 8.0, as mentioned in #117 and #124 ; this solved my problem so it can be a base for your own solution (and if everyone looks good for you, you can even accept this PR).

The idea is simple, for the SDK 26+ we create the notification channel such that we don't have a null channel; we set the already existing config to use the channel we previously created.

LorenDorez commented 6 years ago

@lini @DimitarTachev @radeva

Any update on when this will be accepted?

DimitarTachev commented 6 years ago

Hi @LorenDorez,

That's the current state of the issue (a quote from the community slack):

"I’m investigating the Oreo issues but we are still looking for the best solution as it’s something related to the NativeScript Angular lifecycle. The native lib used in the latest version of the plugin supports Android Oreo and the notifications are working as expected in a NativeScript App without Angular. I will update you back in the issues and the Pull Request as soon as we find the best solution."

LorenDorez commented 6 years ago

Well my app doesn't use angular and I have this issue.

DimitarTachev commented 6 years ago

@LorenDorez, we are not able to reproduce the issues without Angular. You could try removing your platforms folder and make sure you are using the latest version of the plugin (3.2.2). You could also try reproducing the issue in the demo app of the plugin and update us back if needed.

LorenDorez commented 6 years ago

@DimitarTachev Yes i have tried remove the platform several time and rebuilding several times. Whenever i use my emulator using PIXEL 2 with Android 8.0.1 i get this error. Actually i have been getting it ever since API 26 but was able to by pass it by setting androidDisplayNotification to false until Oreo came out which requires the notification.

If using a device with API26+ and under Android 8.0.0 then you can set the androidDisplaynotification to false but if using Android 8.0.0 and higher that no longer works

DimitarTachev commented 6 years ago

I'm closing this Pull Request as the fixes are implemented in PR #129.

@LorenDorez, I suggest you try the fixes in the above-mentioned PR and open an issue as this PR is not the proper place for such discussion.

@fthuin, thanks for the assistance and the PR!