Skip to content
pubscout

wear_ongoing_activity

0.1.7, released 5 months ago by rexios.dev

Create and maintain ongoing activity notifications on Wear OS.

WASM-ready
$ flutter pub add wear_ongoing_activity
Source repository

What it does

Allows Flutter apps to create, update, and stop ongoing activity notifications specifically for Wear OS devices. It manages custom templates, stopwatch parts, and timer parts to display active states.

AI-written summary of version 0.1.7, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are developing a Wear OS app in Flutter that needs ongoing activities.
  • You need to show live workouts, timers, or countdowns in the Wear OS UI.

Skip it when

  • Your target platform is standard mobile or desktop instead of Wear OS.
  • You only need standard local push notifications.

Strengths

  • Specialized for Wear OS ongoing activities.
  • Provides simple start, update, and stop methods.

Weaknesses

  • Requires manual Android manifest configuration and foreground service permissions.
  • Platform-specific to Android/Wear OS.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
Yes (build_runner)
Direct dependencies
1

Requires adding foreground service permissions and the OngoingActivityService to AndroidManifest.xml.

import 'package:wear_ongoing_activity/wear_ongoing_activity.dart';

void main() {
  WearOngoingActivity.start(
    channelId: 'ongoing_activity',
    channelName: 'Ongoing Activity',
    notificationId: 12345,
    category: NotificationCategory.workout,
    smallIcon: 'ic_launcher',
    staticIcon: 'ic_launcher',
    status: OngoingActivityStatus(
      templates: ['#type#: #time#'],
      parts: [
        TextPart(name: 'type', text: 'countup'),
        StopwatchPart(name: 'time', timeZero: DateTime.now()),
      ],
    ),
  );
}

Alternatives

Packages that do the same job and could replace wear_ongoing_activity.

Works with

Packages commonly used together with wear_ongoing_activity: ones it builds on, ones built on it, and its own family.