activity_recognition_flutter 1.2.0 copy "activity_recognition_flutter: ^1.2.0" to clipboard
activity_recognition_flutter: ^1.2.0 copied to clipboard

outdated

Activity recognition plugin for Android and iOS using the native APIs with updated Kotlin version to 1.2.51, forked from https://github.com/Morosko/flutter_activity_recognition. ActivityRecognitionCli [...]

activity_recognition_flutter #

pub package

Important #

This package uses the Android Embedding API v2. In order to use this in pre-Flutter 1.12 projects, you need to follow this guide: https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects Activity recognition plugin for Android and iOS. Only working while App is running (= not terminated by the user or OS).

Getting Started #

Check out the example directory for a sample app using activity recognition.

Android Permissions #

Add permission to your Android Manifest:

<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />

Add the plugin service inside the <application> tags:

<service android:name="dk.cachet.activity_recognition_flutter.activity.ActivityRecognizedService" />

iOS Permissions #

An iOS app linked on or after iOS 10.0 must include usage description keys in its Info.plist file for the types of data it needs. Failure to include these keys will cause the app to crash. To access motion and fitness data specifically, it must include NSMotionUsageDescription.

Flutter Usage #

import 'package:activity_recognition_flutter/activity_recognition_flutter.dart';
...
ActivityRecognition.activityUpdates()

Data types #

iOS #

Label Description
stationary A Boolean indicating whether the device is stationary.
walking A Boolean indicating whether the device is on a walking person.
running A Boolean indicating whether the device is on a running person.
automotive A Boolean indicating whether the device is in an automobile.
cycling A Boolean indicating whether the device is in a bicycle.
unknown A Boolean indicating whether the type of motion is unknown.

Android #

Label Description
IN_VEHICLE The device is in a vehicle, such as a car.
ON_BICYCLE The device is on a bicycle.
ON_FOOT The device is on a user who is walking or running.
RUNNING The device is on a user who is running.
STILL The device is still (not moving).
TILTING The device angle relative to gravity changed significantly.
UNKNOWN Unable to detect the current activity.
WALKING The device is on a user who is walking.
59
likes
0
pub points
81%
popularity

Publisher

verified publishercachet.dk

Activity recognition plugin for Android and iOS using the native APIs with updated Kotlin version to 1.2.51, forked from https://github.com/Morosko/flutter_activity_recognition. ActivityRecognitionClient on Android, CoreMotion on iOS.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on activity_recognition_flutter