- Add
restartService
function. You can now restart the service to get the newReceivePort
. - Improve service-related function code. A return value has been added to check if the function was properly requested.
- Upgrade shared_preferences: ^2.0.8
- Add
required keyword
to parameters of saveData func. - Add
isSticky
notification option for Android.
- [BREAKING] The way you start the foreground service and register tasks has changed. Check readme for more information.
- [BREAKING] Change function name from
start
tostartService
. - [BREAKING] Change function name from
update
toupdateService
. - [BREAKING] Change function name from
stop
tostopService
. - [BREAKING] Change function name from
isRunningTask
toisRunningService
. - Added functions for data management.
- Fixed an issue where notifications were not removed when the service was stopped.
- Fixed incorrect documentation.
- Fixed playSound option not working properly in the background.
- Implement background task on iOS platform. Please check Readme as setup is required.
- Implement a service restart function to deal with unexpected errors.
- Remove
notification_options.dart
. - Add
android_notification_options.dart
. - Add
ios_notification_options.dart
. - Change the
playSound
default value fromtrue
tofalse
.
- Fixed duplicate call to startForegroundTask function.
- Optimize android native code.
- Add
sendPort
parameter to TaskCallback.
- Update README.md
- Fix
callbackHandle
type casting error.
- Add utility methods related to battery optimization.
- Add
showWhen
option. - Add
visibility
option. - Migrate example to null safety.
- Add
autoRunOnBoot
field toForegroundTaskOptions
. Check the readme for more details.
- Add
onDestroy
to clean up used resources in callback functions.
- Change the notification icon setting method.
- Improved the code so that the notification icon is displayed properly even when using the resource shrinker.
- [BREAKING] Remove singleton
instance
ofFlutterForegroundTask
. - [BREAKING]
TaskCallback
return type changed fromvoid
toFuture<void>
. - [BREAKING] All functions of
FlutterForegroundTask
are applied as static. - [BREAKING] The way foreground task are registered has changed. See the readme for details.
- Add
printDevLog
option. - Update README.md
- Update Example.
- Add
icon
field toNotificationOptions
. - Change the model's
toMap
function name totoJson
.
- Add
FlutterForegroundTask.instance.update()
function. - Update README.md
- Fix incorrect comments and documents.
- Add
enableVibration
notification options. - Add
playSound
notification options.
- Fix an issue where
RemoteServiceException
occurs.
- Add
WillStartForegroundTask
widget.
- Fix incorrect comments and documents.
- Add
channelImportance
notification options. - Add
priority
notification options.
- Add
WithForegroundTask
widget.
- Initial release.