live_activities 2.4.1 copy "live_activities: ^2.4.1" to clipboard
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 and createOrUpdateActivity().
  • 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 in getActivityState().

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.
520
likes
160
points
10.6k
downloads
screenshot

Publisher

verified publisherdimitridessus.fr

Weekly Downloads

Support iOS Live Activities, Android RemoteViews and iPhone's Dynamic Island.

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_app_group_directory, image, path_provider, plugin_platform_interface

More

Packages that depend on live_activities