NativeScript / sample-android-background-services

Using Android Background Services in NativeScript
63 stars 10 forks source link

Targeting both API Level 26+ and below #42

Closed andresilva-cc closed 5 years ago

andresilva-cc commented 5 years ago

As stated in the README:

The current implementation utilizes the NotificationChannel, which was added in API Level 26. If you want to target lower API Levels, take a look at the older implementation Alarm Manager Implementation. Have in mind, that this approaches is not supported with API Level 26 or newer due to limitations in the OS.

So, how can I implement background services that will work on both API Level 26+ and below? Because the two solutions provided will only work on either 26+ or below 26.

andresilva-cc commented 5 years ago

This post in StackOverflow helps with that: https://stackoverflow.com/questions/58423548/how-can-i-implement-android-background-service-in-nativescript-targeting-both-ap