Skip to content
pubscout

flutter_activity_recognition

4.0.0, released 2 years ago by pravera.me

Recognize user activity on Android and iOS platforms.

WASM-ready
$ flutter pub add flutter_activity_recognition
Source repository

What it does

Recognizes user physical activity on Android and iOS using native platform APIs (ActivityRecognitionClient and CMMotionActivityManager). Provides permission handling and a real-time activity stream.

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

Use it when

  • You need to detect user movement types like walking, running, or vehicle transport.
  • You are building fitness, tracking, or location-aware apps on Android and iOS.

Skip it when

  • You do not need native activity recognition capabilities.

Strengths

  • Supports both Android and iOS platforms
  • Provides a real-time activity stream

Weaknesses

  • Requires manual platform-specific configuration and permissions setup
  • Background usage requires an additional foreground task plugin

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
0

Requires adding permissions to AndroidManifest.xml and NSMotionUsageDescription to Info.plist.

Future<void> _subscribeActivityStream() async {
  if (await _checkAndRequestPermission()) {
    _activitySubscription = FlutterActivityRecognition.instance.activityStream
        .handleError(_onError)
        .listen(_onActivity);
  }
}

Alternatives

Packages that do the same job and could replace flutter_activity_recognition.

  • upgrader

    Prompt users to upgrade when a newer version of the app is available in the store.

  • system_info2

    Provides easy access to system information like architecture, kernel, memory, OS, CPU, and user.

  • rate_my_app

    Ask users to rate your app if custom conditions like install time or launches are met.

  • activity_recognition_flutter

    Activity recognition plugin for Android and iOS providing event-based information about user activities.