dev-hwang / flutter_activity_recognition Goto Github PK
View Code? Open in Web Editor NEWThis plugin is used to recognize user activity on Android and iOS platforms.
License: MIT License
This plugin is used to recognize user activity on Android and iOS platforms.
License: MIT License
Not working on Android 14 please update the package
By using authorizationStatus
we can determine the permission status without triggering the permission dialog on iOS.
We could replace the code here:
flutter_activity_recognition/ios/Classes/PermissionManager.swift
Lines 16 to 26 in 5396f4e
With something like this:
public func checkMotionActivityPermission(handler: @escaping PermissionRequestResultHandler) {
let status = CMMotionActivityManager.authorizationStatus()
switch (status) {
case .authorized:
handler(PermissionRequestResult.GRANTED)
case .denied, .restricted:
handler(PermissionRequestResult.PERMANENTLY_DENIED)
default:
handler(PermissionRequestResult.DENIED)
}
}
What do you think?
The plugin currently uses the raw activity stream on this line: https://github.com/Dev-hwang/flutter_activity_recognition/blob/fc307fae14686b4ce0470782862bcfe089a26c81/android/src/main/kotlin/com/pravera/flutter_activity_recognition/service/ActivityRecognitionManager.kt#L74C12-L74C12
In addition to the option of subscribing to the raw activity recognition stream it would be good to have the option to just subscribe to transition events:
I am using this package for getting user activities. But sometimes my app got crashes and also not getting activities.Why this happending?
Does this plugin work when app is killed or is in background? @Dev-hwang
I see the following crash as soon as i try to use the plugin:
java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.ActivityRecognitionClient, but class was expected (declaration of 'com.google.android.gms.location.ActivityRecognitionClient'
I am running the latest plugin version with these android sdk settings:
compileSdkVersion 33
targetSdkVersion 33
minSdkVersion 23
Trying to upgrade my google play services location to this, did also not work:
implementation "com.google.android.gms:play-services-location:21.0.1"
is there any way to resolve this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.