custom_activity_recognition 0.0.4 copy "custom_activity_recognition: ^0.0.4" to clipboard
custom_activity_recognition: ^0.0.4 copied to clipboard

This plugin is used to recognize user activity transition on Android and iOS platforms.

custom_activity_recognition #

Activity recognition plugin for Android and iOS

Notes #

  • On Android use Activity Recognition Transition API
  • On iOS use CoreMotion

Getting started #

  • Android Open the AndroidManifest.xml file and add the following permissions between the
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
    <uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
    <uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
  • iOS Open the ios/Runner/Info.plist file and add the following permission inside the
	<key>NSMotionUsageDescription</key>
    <string>Detects human activity</string>
    <key>UIBackgroundModes</key>
    <array>
        <string>fetch</string>
        <string>motion</string>
    </array>

ActivityData #

class ActivityData {
  final DateTime timestamp;
  final String activity;    
}

Types of activities #

Android:

  • IN_VEHICLE
  • ON_BICYCLE
  • RUNNING
  • ON_FOOT
  • WALKING
  • STILL
  • UNKNOWN

iOS:

  • IN_VEHICLE
  • ON_BICYCLE
  • RUNNING
  • WALKING
  • STILL
  • UNKNOWN
10
likes
0
points
354
downloads

Publisher

unverified uploader

Weekly Downloads

This plugin is used to recognize user activity transition on Android and iOS platforms.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

equatable, flutter, plugin_platform_interface

More

Packages that depend on custom_activity_recognition