live_activities 2.4.1
live_activities: ^2.4.1 copied to clipboard
Support iOS Live Activities, Android RemoteViews and iPhone's Dynamic Island.
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
createActivity
andcreateOrUpdateActivity()
. - Bump iOS minimum version to 13.
2.3.2 #
- ⨠Ability to get the "pushToStartToken" (thanks to @Clon1998 đ).
- âŦī¸ Upgrade dependencies.
2.3.1 #
- đ
LiveActivityFileFromMemory
can'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
null
value 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
activityUpdateStream
implementation 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.