Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
1555524
Add the android.permission.ACTIVITY_RECOGNITION setup to the README
sztyr Nov 19, 2021
50f3955
feat: Add method for calculating total steps
PinkyUni Dec 3, 2021
e324a9e
feat: Fix return type
PinkyUni Dec 3, 2021
f984cf7
feat: Rename method
PinkyUni Dec 3, 2021
2306c3f
feat: Fix issues
PinkyUni Dec 3, 2021
c34b08e
feat: Fix ios issues
PinkyUni Dec 3, 2021
9726e6d
feat: Fix some swift issues
PinkyUni Dec 3, 2021
a924c3f
fix: android 12 intent-flag
altanod0627 Dec 14, 2021
6d81fbd
Merge pull request #462 from matsunanaro/metric
bardram Dec 29, 2021
1234a70
merge of PR #457 and #462
bardram Dec 29, 2021
d3a605a
Merge pull request #458 from sztyr/update-README-android-permissions
bardram Dec 29, 2021
94a31f4
Merge branch 'master' into feat/get-total-steps
bardram Dec 29, 2021
308269a
Merge pull request #471 from PinkyUni/feat/get-total-steps
bardram Dec 29, 2021
765796c
Update of example app and API docs
bardram Dec 29, 2021
4d446ae
health v 3.4.0 published
bardram Dec 29, 2021
25884f9
Merge pull request #474 from altanod0627/master
bardram Dec 30, 2021
2bc3cf0
activity_recognition published v. 4.1.0
bardram Dec 30, 2021
e40e223
small typo fix
bardram Dec 31, 2021
d7dd774
Update CHANGELOG.md
bardram Jan 3, 2022
63efba6
moved parsing out of main thread
Nov 25, 2021
33842eb
using Isolate and moved parsing out of main thread
Nov 26, 2021
35e547d
fixed concurrent issues by tapping from thread pool and using isolate
Nov 26, 2021
16255f7
fixed crash by returning result to main thread
Jan 3, 2022
b23d4a1
Healthkit CategorySample
drodenberg Jan 6, 2022
eff4192
refactor of activity recognition package and release
bardram Jan 6, 2022
77854ec
cleanup in mobility_features
bardram Jan 9, 2022
50bbd4e
Merge pull request #483 from matsunanaro/thread_safe
bardram Jan 9, 2022
144d0c3
Merge pull request #485 from drodenberg/master
bardram Jan 9, 2022
552dc1b
health version: 3.4.1 published
bardram Jan 9, 2022
f0efe23
update API and README docs in health plugin
bardram Jan 10, 2022
d5f229e
misc cleanup and refactor in health plugin
bardram Jan 10, 2022
cb2b830
Update pubspec.yaml
bardram Jan 10, 2022
bb94add
Update README.md
bardram Jan 10, 2022
353c93e
fix #401
bardram Jan 10, 2022
21695c0
health 3.4.3 published
bardram Jan 10, 2022
ab460e4
Update README.md
bardram Jan 12, 2022
c15b6c1
Update README.md
bardram Jan 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,9 @@ packages/audio_streamer/example/.flutter-plugins-dependencies
*.sh
packages/health/example/.flutter-plugins-dependencies
*.sh
packages/health/example/.flutter-plugins-dependencies
packages/health/example/.flutter-plugins-dependencies
packages/activity_recognition_flutter/example/.flutter-plugins-dependencies
packages/mobility_features/example/.flutter-plugins-dependencies
packages/mobility_features/example/.flutter-plugins-dependencies
packages/health/example/.flutter-plugins-dependencies
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For more information about plugins, and how to use them, see
## Plugins
These are the available plugins in this repository.

| Plugin | Description | Android | iOS | Pub |
| Plugin | Description | Android | iOS | http://pub.dev/ |
|--------|-------------|:-------:|:---:|:---------:|
| [screen_state](./packages/screen_state) | Track screen state changes | ✔️ | ❌ | [![pub package](https://img.shields.io/pub/v/screen_state.svg)](https://pub.dartlang.org/packages/screen_state) |
| [light](./packages/light) | Track light sensor readings | ✔️ | ❌ | [![pub package](https://img.shields.io/pub/v/light.svg)](https://pub.dartlang.org/packages/light) |
Expand All @@ -35,15 +35,19 @@ Please check existing issues and file any new issues, bugs, or feature requests

## Contributing

If you wish to contribute a new plugin to the Flutter ecosystem, please
As part of the open-source Flutter ecosystem, we would welcome any help in maintaining and enhancing these plugins.
We (i.e., CACHET) have limited resources for maintaining these plugins and we rely on **your** help in this.
We welcome any contribution -- from small error corrections in the documentation, to bug fixes, to large features enhacements, or even new features in a plugin.
If you wish to contribute to any of the plugins in this repo,
please review our [contribution guide](https://github.com/cph-cachet/flutter-plugins/CONTRIBUTING.md),
and send a [pull request](https://github.com/cph-cachet/flutter-plugins/pulls).


In general, if you wish to contribute a new plugin to the Flutter ecosystem, please
see the documentation for [developing packages](https://flutter.io/developing-packages/) and
[platform channels](https://flutter.io/platform-channels/). You can store
your plugin source code in any GitHub repository (the present repo is only
intended for plugins developed by the core CARP team). Once your plugin
is ready you can [publish](https://flutter.io/developing-packages/#publish)
to the [pub repository](https://pub.dartlang.org/).

If you wish to contribute a change to any of the existing plugins in this repo,
please review our [contribution guide](https://github.com/cph-cachet/flutter-plugins/CONTRIBUTING.md),
and send a [pull request](https://github.com/cph-cachet/flutter-plugins/pulls).

10 changes: 9 additions & 1 deletion packages/activity_recognition_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 4.2.0
* small refactor and improvement of docs
* using `ActivityRecognition()` when creating a singleton -- standard practice in Dart.

## 4.1.0
* [PR #474](https://github.com/cph-cachet/flutter-plugins/pull/474) - Android 12 intent-flag
* the name of the stream has been changed from `startStream` to `activityStream`
* cleanup in example app

## 4.0.5+1
* [PR #408](https://github.com/cph-cachet/flutter-plugins/pull/408)

Expand All @@ -17,7 +26,6 @@
* [PR #314](https://github.com/cph-cachet/flutter-plugins/pull/314)

## 4.0.0

- Null safety migration
- Updated swift code

Expand Down
6 changes: 3 additions & 3 deletions packages/activity_recognition_flutter/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ rootProject.allprojects {
apply plugin: 'com.android.library'

android {
compileSdkVersion 29
compileSdkVersion 30

defaultConfig {
minSdkVersion 16
minSdkVersion 21
}
lintOptions {
disable 'InvalidPackage'
}
}

dependencies {
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-location:19.0.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ public class ActivityRecognitionFlutterPlugin implements FlutterPlugin, EventCha
private void startActivityTracking() {
// Start the service
Intent intent = new Intent(androidActivity, ActivityRecognizedBroadcastReceiver.class);
PendingIntent pendingIntent = PendingIntent.getBroadcast(androidActivity, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);

Log.d(TAG, "SDK = " + Build.VERSION.SDK_INT);
int flags = PendingIntent.FLAG_UPDATE_CURRENT;
if (Build.VERSION.SDK_INT >= 31) {
flags |= PendingIntent.FLAG_IMMUTABLE;
}
PendingIntent pendingIntent = PendingIntent.getBroadcast(androidActivity, 0, intent, flags);

// Frequency in milliseconds
long frequency = 5 * 1000;
Expand All @@ -55,13 +61,13 @@ private void startActivityTracking() {
task.addOnSuccessListener(new OnSuccessListener<Void>() {
@Override
public void onSuccess(Void e) {
Log.d(TAG, "ActivityRecognition: onSuccess");
Log.d(TAG, "Successfully registered ActivityRecognition listener.");
}
});
task.addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Log.d(TAG, "ActivityRecognition: onFailure");
Log.d(TAG, "Failed to registered ActivityRecognition listener.");
}
});
}
Expand All @@ -82,13 +88,11 @@ public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBindin
@Override
public void onListen(Object arguments, EventChannel.EventSink events) {
HashMap<String, Object> args = (HashMap<String, Object>) arguments;
Log.d(TAG, "args: " + args);
boolean fg = (boolean) args.get("foreground");
if(fg) {
startForegroundService();
}
Log.d(TAG, "foreground: " + fg);

Log.d(TAG, "Foreground mode: " + fg);

eventSink = events;
startActivityTracking();
Expand Down Expand Up @@ -132,7 +136,7 @@ public void onAttachedToActivity(@NonNull ActivityPluginBinding binding) {

SharedPreferences prefs = androidContext.getSharedPreferences(ACTIVITY_RECOGNITION, Context.MODE_PRIVATE);
prefs.registerOnSharedPreferenceChangeListener(this);
Log.d(TAG, "onAttachedToActivity");
// Log.d(TAG, "onAttachedToActivity");
}

@Override
Expand Down Expand Up @@ -161,9 +165,9 @@ public void onDetachedFromActivity() {
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
String result = sharedPreferences
.getString(DETECTED_ACTIVITY, "error");
Log.d("onSharedPreferenceChange", result);
// Log.d("onSharedPreferenceChange", result);
if (key!= null && key.equals(DETECTED_ACTIVITY)) {
Log.d(TAG, "Detected activity: " + result);
// Log.d(TAG, "Detected activity: " + result);
eventSink.success(result);
}
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "dk.cachet.activity_recognition_flutter_example"
minSdkVersion 16
minSdkVersion 21
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
LastUpgradeCheck = 1320;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -321,6 +321,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -339,7 +340,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -400,6 +401,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -424,7 +426,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -455,6 +457,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -473,7 +476,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand All @@ -491,7 +494,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = H33599VJ27;
DEVELOPMENT_TEAM = 8TB3T6MAZG;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Original</string>
<string>Latest</string>
<key>PreviewsEnabled</key>
<false/>
</dict>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1320"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,8 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
Expand All @@ -38,8 +36,8 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -61,8 +59,6 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
Expand Down
Loading