live_activities 2.4.3
live_activities: ^2.4.3 copied to clipboard
Support iOS Live Activities, Android RemoteViews and iPhone's Dynamic Island.
2.4.3 #
- ποΈ Migrating to UISceneDelegate (Flutter 3.38.x iOS breaking change).
- ποΈ Default SDK environment is now 3.10.0 and Flutter SDK >= 3.38.0.
- ποΈ Fix compile error Android example project (thanks to @trunghieuvn π).
- β¨π (Android) Store notification IDs on app termination and return string IDs to Dart (thanks to @felixibel π).
- β¨ Add support for
getActivityState()to detect activity by custom activity id (thanks to @reynirf π). - β¨ Add option to control iOS notification permission request (thanks to @asmz π).
2.4.2 #
- β¨ New method
areActivitiesSupported()β‘οΈ Check if live activities are supported on the current platform/OS version. (thanks to @MortadhaFadhlaoui π). - ποΈ Method
areActivitiesEnabled()β‘οΈ Now only checks user settings without platform version validation. (thanks to @MortadhaFadhlaoui π).
2.4.1 #
- π Check for customId in endActivitiesWithId (thanks to @dkobia π).
- π Bugfix avoid remove all notifications (thanks to @EArminjon π).
2.4.0 Live activity is now available for Android too! #
- β¨ Add support for Android Live Activities (thanks to @EArminjon π).
- π Custom ID activities fail to end correctly (thanks to @charleyzhu π).
- π Update README.md for local and remote Live activities.
βΉοΈ BREAKING CHANGES βΉοΈ
- On both platforms, activityID is now a required parameter for
createActivityandcreateOrUpdateActivity(). - Bump iOS minimum version to 13.
2.3.2 #
- β¨ Ability to get the "pushToStartToken" (thanks to @Clon1998 π).
- β¬οΈ Upgrade dependencies.
2.3.1 #
- π
LiveActivityFileFromMemorycan't share image with AppGroup (thanks to @EArminjon π). - π Added minor version check when not being able to see the Live Activity (thanks to @dasanten π).
- β¬οΈ Upgrade dependencies.
2.3.0 #
- ποΈ Move to Swift Package Manager.
- ποΈ Regenerate example app.
- β¬οΈ Upgrade dependencies.
2.2.0 #
- β¨ Added a new method
createOrUpdateActivity(), you can use it to create or update by passing an activity ID (thanks to @Clon1998 π). - β¬οΈ Upgrade dependencies.
2.1.0 #
- β¨ You can now send generic files instead of just pictures.
To send a file you can do the following on the Dart code:
LiveActivityFileFromAsset('assets/files/rules.txt')
And in your Swift code:
let ruleFile = sharedDefault.string(forKey: context.attributes.prefixedKey("yourFileKey"))!
let rule = (try? String(contentsOfFile: ruleFile, encoding: .utf8)) ?? ""
Check the example for a full demo.
BREAKING CHANGES
You must replace your images to:
LiveActivityFileFromAsset.image()LiveActivityFileFromMemory.image()LiveActivityFileFromUrl.image()
In order to use resizeFactor you must do the following now:
LiveActivityFileFromAsset.image(
'assets/images/chelsea.png',
imageOptions: LiveActivityImageFileOptions(
resizeFactor: 0.2
)
),
- π Example works again with scheme.
2.0.1 #
- π Fix channel message sent from native to Flutter on a non-platform thread (thanks to @aswanath π)
- ποΈ Clean some code.
2.0.0 #
- β¨ Use new custom iOS App Group Directory dependency (this will fix namespace for Android gradle builds).
- β¨ Removed deprecated flutter_native_image dependency and replaced by image (thanks to @SnapDrive π)
- β¬οΈ Upgrade dependencies.
1.9.5 #
- π Fix
areActivitiesEnabled()on unsupported devices.
1.9.4 #
- π± Convert images to webp.
- β¬οΈ Upgrade dependencies.
1.9.3 #
- π Force returning false for
areActivitiesEnabled()when no iOS devices.
1.9.2 #
- β¨ Simplified fetching of ActivityState of all created live activities (thanks to @Clon1998 π).
- π Fixes background thread invocation of event streams (thanks to @ggirotto π).
- π Replaced getImageProperties with dart buffer and descriptor (thanks to @anumb π).
- π Fix tests.
- β¬οΈ Upgrade dependencies.
1.9.1 #
- β¨ Add update with alert config (thanks @charlesRmajor π).
- β¨ Add an option to use preloaded images (thanks @Niklas-Sommer π).
- β¨ Add Android support - currently only used to check if live activities is supported (thanks @ggirotto π).
- β¨ Example app support Material 3.
- π Fix tests.
- π Update README.md.
- β¬οΈ Upgrade dependencies.
1.9.0 #
- β¨ BREAKING CHANGE: Add the ability to handle multiple live notification (thanks @Clon1998 π).
Please follow this tutorial to add implement it:
- Add the following Swift extension at the end of your extension code:
extension LiveActivitiesAppAttributes {
func prefixedKey(_ key: String) -> String {
return "\(id)_\(key)"
}
}
- For each keys on your native Swift code, please changes the following lines:
let myVariableFromFlutter = sharedDefault.string(forKey: "myVariableFromFlutter") // repleace this by ...
let myVariableFromFlutter = sharedDefault.string(forKey: context.attributes.prefixedKey("myVariableFromFlutter")) // <-- this
- π Fix stall state for unknown activityId (thanks @Clon1998 π).
- π Now return
nullvalue when activity is not found ingetActivityState().
1.8.0 #
- β¨ Add url scheme optional argument.
- β¨ Add sinks unregister on engine end (thanks @ggirotto π).
- π Fix example images size.
- β¬οΈ Upgrade dependencies.
1.7.5 #
- π¨ Lint some code.
- π Fix deprecated tests.
- β¬οΈ Upgrade dependencies.
1.7.4 #
- π Method
areActivitiesEnabled()are now callable on iOS < 16.1 - β¨ Creating an activity can now use stale-date (thanks @arnar-steinthors π).
1.7.3 #
- β¨ ActivityUpdate subclasses are now public along with a new MapOrNull method (thanks @arnar-steinthors π).
1.7.2 #
- β¨ Add missing "stale" activity status.
- π When value set to null in map, value is removed from live activity.
1.7.1 #
- π Fix missing
activityUpdateStreamimplementation channel on native part.
1.7.0 #
- β¨π Change method
getPushToken()to be synchronous. - β¬οΈ Upgrade dependencies.
1.6.0 #
- β¨ Add a way to track push token and the activity status (thanks @arnar-steinthors π).
- β»οΈ Format code.
1.5.0 #
- β¨ Add method to get push token (thanks to @jolamar π).
- β»οΈ Rework Swift code.
1.4.2+1 #
- π Add screenshots in pubspec.yaml
1.4.2 #
- β¨ End live activity when the app is terminated (thanks to @JulianBissekkou π).
1.4.1 #
- π Fix a bug where init never completes (thanks to @JulianBissekkou π).
1.4.0 #
- β¨ Can now pass assets between Flutter & Native.
- π Update README.md.
1.3.0+1 #
- π Update README.md.
1.3.0 #
- β¨ Now using App Groups to pass typed data across Flutter & Native !
- ποΈ Remove unused code in example.
- π Improve README.md.
1.2.1 #
- β¨ Add method to get the activity state (active, ended or dismissed).
1.2.0 #
- β¨ Add stream to handle url scheme from live activities &/or dynamic island.
- π Improve README.md
- β»οΈ Rework example
1.1.0 #
- β¨ Add method to check if live activities are enabled.
- β¨ Add method to get all activities ids created.
- β¨ Add method to cancel all activities.
- π Fix add result to all methods.
1.0.0 #
- π Initial release.
