android_foreground_service_with_awesome_notifications 0.0.6+9 copy "android_foreground_service_with_awesome_notifications: ^0.0.6+9" to clipboard
android_foreground_service_with_awesome_notifications: ^0.0.6+9 copied to clipboard

discontinuedreplaced by: awesome_notifications
PlatformAndroid
outdated

Provides Android foreground services based on awesome_notifications notification system

android_foreground_service_with_awesome_notifications #

There are already serveral packages on pub that allow you to create an Android foreground service. Since an Android foreground service always needs an Android notification, most of the plugins come with an own notification system. On the other hand, the most used notification system for flutter is awesome_notifications, and chances are that your app already uses it. The problem is now that you don't want to have two API's for notifications: one for the foreground service and one for awesome_notifications. So this package provides a foreground service that uses awesome_notifications PushNotification class, and also uses it's java side algorithms to convert that dart object into an Android notification. That is possible because in flutter you can import java classes from other packages.

Configuration #

While the foreground service permission is automatically added by this plugin, you have to add the ``

 <service   android:name="eu.epnw.afswan.ForegroundService"
            android:enabled="true"            
            android:exported="false"
            android:stopWithTask="true"
            android:foregroundServiceType=As you like
></service>

While the android:name must exactly match this value, you can configure the other parameters as you like, although it is recommended to copy the values for android:enabled, android:exported and android:stopWithTask. Suitable values for foregroundServiceType can be found here.

IMPORTANT #

If the icon of the notification is not set or not valid, the notification will appear, but will look very strange. Make sure to always specify an valid icon. If you need help with this, take a look at awesome_notifications examples.

About this plugins name #

Yes, android_foreground_service_with_awesome_notifications is a very long plugin name, but on the other hand very precise and tells you what this plugin does, just by reading the title. In some places we use AFSWAN as abbreviation.

0
likes
120
pub points
0%
popularity

Publisher

verified publishereric-prokop-und-nils-wieler.de

Provides Android foreground services based on awesome_notifications notification system

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (LICENSE)

Dependencies

awesome_notifications, flutter

More

Packages that depend on android_foreground_service_with_awesome_notifications