diff --git a/apps/carp_mobile_sensing_app/android/app/build.gradle b/apps/carp_mobile_sensing_app/android/app/build.gradle
index bcd1dc52e..cf54b22ab 100644
--- a/apps/carp_mobile_sensing_app/android/app/build.gradle
+++ b/apps/carp_mobile_sensing_app/android/app/build.gradle
@@ -12,12 +12,12 @@ android {
compileOptions {
coreLibraryDesugaringEnabled = true
- sourceCompatibility = JavaVersion.VERSION_1_8
- targetCompatibility = JavaVersion.VERSION_1_8
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
- jvmTarget = JavaVersion.VERSION_1_8
+ jvmTarget = '17'
}
defaultConfig {
@@ -44,6 +44,8 @@ dependencies {
// Use to implement Health Connect. Requires SDK level 34.
implementation "androidx.health.connect:connect-client:1.1.0-rc02"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
+ // AppCompat library for Theme.AppCompat.NoActionBar
+ implementation 'androidx.appcompat:appcompat:1.7.0'
}
flutter {
diff --git a/apps/carp_mobile_sensing_app/android/app/src/main/AndroidManifest.xml b/apps/carp_mobile_sensing_app/android/app/src/main/AndroidManifest.xml
index 3a017708e..d915aecc1 100644
--- a/apps/carp_mobile_sensing_app/android/app/src/main/AndroidManifest.xml
+++ b/apps/carp_mobile_sensing_app/android/app/src/main/AndroidManifest.xml
@@ -27,6 +27,7 @@
+
@@ -194,5 +195,13 @@
+
+
+
diff --git a/apps/carp_mobile_sensing_app/android/settings.gradle b/apps/carp_mobile_sensing_app/android/settings.gradle
index 7e2eddbda..c70a52070 100644
--- a/apps/carp_mobile_sensing_app/android/settings.gradle
+++ b/apps/carp_mobile_sensing_app/android/settings.gradle
@@ -23,7 +23,7 @@ plugins {
// id "org.jetbrains.kotlin.android" version "2.0.0" apply false
id "com.android.application" version '8.10.1' apply false
- id "org.jetbrains.kotlin.android" version "1.8.22" apply false
+ id "org.jetbrains.kotlin.android" version "2.1.0" apply false
}
include ":app"
diff --git a/apps/carp_mobile_sensing_app/devtools_options.yaml b/apps/carp_mobile_sensing_app/devtools_options.yaml
new file mode 100644
index 000000000..fa0b357c4
--- /dev/null
+++ b/apps/carp_mobile_sensing_app/devtools_options.yaml
@@ -0,0 +1,3 @@
+description: This file stores settings for Dart & Flutter DevTools.
+documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
+extensions:
diff --git a/apps/carp_mobile_sensing_app/ios/Flutter/AppFrameworkInfo.plist b/apps/carp_mobile_sensing_app/ios/Flutter/AppFrameworkInfo.plist
index 7c5696400..1dc6cf765 100644
--- a/apps/carp_mobile_sensing_app/ios/Flutter/AppFrameworkInfo.plist
+++ b/apps/carp_mobile_sensing_app/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 12.0
+ 13.0
diff --git a/apps/carp_mobile_sensing_app/ios/Runner.xcodeproj/project.pbxproj b/apps/carp_mobile_sensing_app/ios/Runner.xcodeproj/project.pbxproj
index 48b45b8ca..3776090fe 100644
--- a/apps/carp_mobile_sensing_app/ios/Runner.xcodeproj/project.pbxproj
+++ b/apps/carp_mobile_sensing_app/ios/Runner.xcodeproj/project.pbxproj
@@ -10,9 +10,9 @@
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 54AA01F4112BB55AF6F3FB8A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85D4562AC19498C44634738E /* Pods_Runner.framework */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
- 8579A77998212F36726877AC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D9096F33A852F3AF57CB3C1 /* Pods_Runner.framework */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@@ -43,17 +43,18 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
- 1312C27C8258C4558AABBC37 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 19A80A4EBFB3316565C8DD86 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
- 7523FE4B8B18392943128232 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
+ 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; };
+ 79DE2EDEE9687F42D770FE5A /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
- 7D9096F33A852F3AF57CB3C1 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 85D4562AC19498C44634738E /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -64,7 +65,7 @@
ABAFDD0B2D9E8FCB00691BDF /* CoreAudioTypes.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudioTypes.framework; path = System/Library/Frameworks/CoreAudioTypes.framework; sourceTree = SDKROOT; };
ABAFDD0D2D9E90AF00691BDF /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
ABAFDD152D9ECA9100691BDF /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; };
- D10B79D93537C018E18CFF62 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
+ E1ACD7C2F1D200D126D40CD1 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -74,7 +75,7 @@
files = (
ABAFDD0E2D9E90AF00691BDF /* CoreAudio.framework in Frameworks */,
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
- 8579A77998212F36726877AC /* Pods_Runner.framework in Frameworks */,
+ 54AA01F4112BB55AF6F3FB8A /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -91,9 +92,9 @@
09F22D635E2A50491278A6C9 /* Pods */ = {
isa = PBXGroup;
children = (
- 7523FE4B8B18392943128232 /* Pods-Runner.debug.xcconfig */,
- D10B79D93537C018E18CFF62 /* Pods-Runner.release.xcconfig */,
- 1312C27C8258C4558AABBC37 /* Pods-Runner.profile.xcconfig */,
+ E1ACD7C2F1D200D126D40CD1 /* Pods-Runner.debug.xcconfig */,
+ 19A80A4EBFB3316565C8DD86 /* Pods-Runner.release.xcconfig */,
+ 79DE2EDEE9687F42D770FE5A /* Pods-Runner.profile.xcconfig */,
);
path = Pods;
sourceTree = "";
@@ -111,7 +112,7 @@
children = (
ABAFDD0D2D9E90AF00691BDF /* CoreAudio.framework */,
ABAFDD0B2D9E8FCB00691BDF /* CoreAudioTypes.framework */,
- 7D9096F33A852F3AF57CB3C1 /* Pods_Runner.framework */,
+ 85D4562AC19498C44634738E /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "";
@@ -119,6 +120,7 @@
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
+ 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
@@ -189,14 +191,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
- C36405A17497DF113203C7E0 /* [CP] Check Pods Manifest.lock */,
+ 1FB35733271CF8C777A99D41 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
- 97CF6E85DDE31A9E4E5CD206 /* [CP] Copy Pods Resources */,
+ C08D0469E81CB0D1E7D56AC1 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -274,6 +276,28 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
+ 1FB35733271CF8C777A99D41 /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
@@ -305,7 +329,7 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
- 97CF6E85DDE31A9E4E5CD206 /* [CP] Copy Pods Resources */ = {
+ C08D0469E81CB0D1E7D56AC1 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -322,28 +346,6 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
- C36405A17497DF113203C7E0 /* [CP] Check Pods Manifest.lock */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
- outputFileListPaths = (
- );
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
- showEnvVarsInLog = 0;
- };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -439,7 +441,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -580,7 +582,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -633,7 +635,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
diff --git a/apps/carp_mobile_sensing_app/lib/main.dart b/apps/carp_mobile_sensing_app/lib/main.dart
index e64eff44c..9d419a13d 100644
--- a/apps/carp_mobile_sensing_app/lib/main.dart
+++ b/apps/carp_mobile_sensing_app/lib/main.dart
@@ -20,11 +20,12 @@ import 'package:carp_movisens_package/carp_movisens_package.dart';
import 'package:carp_health_package/health_package.dart';
import 'package:health/health.dart';
// import 'package:carp_movesense_package/carp_movesense_package.dart';
-import 'package:carp_cortrium_package/carp_cortrium_package.dart';
+// import 'package:carp_cortrium_package/carp_cortrium_package.dart';
import 'package:carp_webservices/carp_auth/carp_auth.dart';
import 'package:carp_webservices/carp_services/carp_services.dart';
import 'package:carp_backend/carp_backend.dart';
+import 'package:package_info_plus/package_info_plus.dart';
import 'config.dart';
diff --git a/apps/carp_mobile_sensing_app/lib/src/app.dart b/apps/carp_mobile_sensing_app/lib/src/app.dart
index 47d505e08..4470a04dc 100644
--- a/apps/carp_mobile_sensing_app/lib/src/app.dart
+++ b/apps/carp_mobile_sensing_app/lib/src/app.dart
@@ -20,8 +20,16 @@ class LoadingPage extends StatelessWidget {
///
/// Returns true when successfully done.
Future init(BuildContext context) async {
- // Try to get location permissions as the first thing.
+ // Request all necessary permissions upfront
await Permission.locationWhenInUse.request();
+ await Permission.locationAlways.request();
+ await Permission.activityRecognition.request();
+ await Permission.sensors.request();
+
+ // For Android 14+, also request notification permission for foreground services
+ if (Theme.of(context).platform == TargetPlatform.android) {
+ await Permission.notification.request();
+ }
// Initialize and use the CAWS backend if not in local deployment mode
if (bloc.deploymentMode != DeploymentMode.local) {
diff --git a/apps/carp_mobile_sensing_app/lib/src/blocs/local_study_protocol_manager.dart b/apps/carp_mobile_sensing_app/lib/src/blocs/local_study_protocol_manager.dart
index 697b51105..e53dd13b8 100644
--- a/apps/carp_mobile_sensing_app/lib/src/blocs/local_study_protocol_manager.dart
+++ b/apps/carp_mobile_sensing_app/lib/src/blocs/local_study_protocol_manager.dart
@@ -118,15 +118,15 @@ class LocalStudyProtocolManager implements StudyProtocolManager {
// locationService);
// Define the online weather service and add it as a 'device'
- WeatherService weatherService = WeatherService(apiKey: openWeatherApiKey);
- protocol.addConnectedDevice(weatherService, phone);
+ // WeatherService weatherService = WeatherService(apiKey: openWeatherApiKey);
+ // protocol.addConnectedDevice(weatherService, phone);
- // Add a background task that collects weather every 5 minutes.
- protocol.addTaskControl(
- PeriodicTrigger(period: Duration(minutes: 5)),
- BackgroundTask(
- measures: [Measure(type: ContextSamplingPackage.WEATHER)]),
- weatherService);
+ // // Add a background task that collects weather every 5 minutes.
+ // protocol.addTaskControl(
+ // PeriodicTrigger(period: Duration(minutes: 5)),
+ // BackgroundTask(
+ // measures: [Measure(type: ContextSamplingPackage.WEATHER)]),
+ // weatherService);
// // Define the online air quality service and add it as a 'device'
// AirQualityService airQualityService =
@@ -315,22 +315,23 @@ class LocalStudyProtocolManager implements StudyProtocolManager {
//
// Known DTU C3+ devices: ED:AD:D4:3D:3F:72
- var c3 = CortriumDevice(
- name: 'Cortrium C3+',
- identifier: 'ED:AD:D4:3D:3F:72',
- );
+ // var c3 = CortriumDevice(
+ // name: 'Cortrium C3+',
+ // btleAddress: 'ED:AD:D4:3D:3F:72',
+ // );
- protocol.addConnectedDevice(c3, phone);
+ // protocol.addConnectedDevice(c3, phone);
- protocol.addTaskControl(
- ImmediateTrigger(),
- BackgroundTask(measures: [
- Measure(type: CortriumSamplingPackage.ECG),
- // Measure(type: CortriumSamplingPackage.BUTTON),
- Measure(type: CortriumSamplingPackage.BATTERY),
- Measure(type: CortriumSamplingPackage.ACCELEROMETER),
- ]),
- c3);
+ // protocol.addTaskControl(
+ // ImmediateTrigger(),
+ // BackgroundTask(measures: [
+ // Measure(type: CortriumSamplingPackage.ECG),
+ // // Measure(type: CortriumSamplingPackage.BUTTON),
+ // Measure(type: CortriumSamplingPackage.BATTERY),
+ // Measure(type: CortriumSamplingPackage.ACCELEROMETER),
+ // Measure(type: CortriumSamplingPackage.HR),
+ // ]),
+ // c3);
//
// --------- HEALTH PACKAGE EXAMPLES -------------
@@ -460,28 +461,28 @@ class LocalStudyProtocolManager implements StudyProtocolManager {
locationService);
// define the online weather service and add it to the father's phone
- WeatherService weatherService = WeatherService(apiKey: openWeatherApiKey);
- protocol.addConnectedDevice(weatherService, fatherPhone);
+ // WeatherService weatherService = WeatherService(apiKey: openWeatherApiKey);
+ // protocol.addConnectedDevice(weatherService, fatherPhone);
- // add a background task that collects weather every 30 minutes.
- protocol.addTaskControl(
- PeriodicTrigger(period: Duration(minutes: 30)),
- BackgroundTask()
- ..addMeasure(Measure(type: ContextSamplingPackage.WEATHER)),
- weatherService);
+ // // add a background task that collects weather every 30 minutes.
+ // protocol.addTaskControl(
+ // PeriodicTrigger(period: Duration(minutes: 30)),
+ // BackgroundTask()
+ // ..addMeasure(Measure(type: ContextSamplingPackage.WEATHER)),
+ // weatherService);
- // define the online air quality service and add it to the mother's phone
- AirQualityService airQualityService =
- AirQualityService(apiKey: airQualityApiKey);
- protocol.addConnectedDevice(airQualityService, motherPhone);
+ // // define the online air quality service and add it to the mother's phone
+ // AirQualityService airQualityService =
+ // AirQualityService(apiKey: airQualityApiKey);
+ // protocol.addConnectedDevice(airQualityService, motherPhone);
- // add a background task that air quality every 30 minutes.
- protocol.addTaskControl(
- PeriodicTrigger(period: Duration(minutes: 30)),
- BackgroundTask(measures: [
- Measure(type: ContextSamplingPackage.AIR_QUALITY),
- ]),
- airQualityService);
+ // // add a background task that air quality every 30 minutes.
+ // protocol.addTaskControl(
+ // PeriodicTrigger(period: Duration(minutes: 30)),
+ // BackgroundTask(measures: [
+ // Measure(type: ContextSamplingPackage.AIR_QUALITY),
+ // ]),
+ // airQualityService);
// collect noise from the child's phone
protocol.addTaskControl(
diff --git a/apps/carp_mobile_sensing_app/lib/src/blocs/sensing.dart b/apps/carp_mobile_sensing_app/lib/src/blocs/sensing.dart
index b3ad32454..dbe147c03 100644
--- a/apps/carp_mobile_sensing_app/lib/src/blocs/sensing.dart
+++ b/apps/carp_mobile_sensing_app/lib/src/blocs/sensing.dart
@@ -29,7 +29,7 @@ class Sensing {
SamplingPackageRegistry().register(MovisensSamplingPackage());
SamplingPackageRegistry().register(HealthSamplingPackage());
// SamplingPackageRegistry().register(MovesenseSamplingPackage());
- SamplingPackageRegistry().register(CortriumSamplingPackage());
+ // SamplingPackageRegistry().register(CortriumSamplingPackage());
// Register the CARP data manager for uploading data back to CAWS.
// This is needed in both LOCAL and CAWS deployments, since a local study
@@ -127,12 +127,24 @@ class Sensing {
// (local or CAWS), add the study, and deploy it.
await SmartPhoneClientManager().configure(
deploymentService: deploymentService,
- askForPermissions: true,
+ askForPermissions: true, // Allow the system to request permissions as needed
);
study = await SmartPhoneClientManager().addStudy(bloc.study!);
+
await controller?.tryDeployment(useCached: bloc.useCachedStudyDeployment);
- await controller?.configure();
+
+ try {
+ await controller?.configure().timeout(
+ Duration(seconds: 30),
+ onTimeout: () {
+ print('Sensing.initialize() - WARNING: Configure timed out after 30 seconds');
+ print('Sensing.initialize() - Continuing anyway...');
+ },
+ );
+ } catch (error) {
+ print('Sensing.initialize() - ERROR during configure: $error');
+ }
// Listen on the measurements stream and print them as json.
SmartPhoneClientManager()
diff --git a/apps/carp_mobile_sensing_app/lib/src/view_models/device_descriptions.dart b/apps/carp_mobile_sensing_app/lib/src/view_models/device_descriptions.dart
index af12ec951..aefa87112 100644
--- a/apps/carp_mobile_sensing_app/lib/src/view_models/device_descriptions.dart
+++ b/apps/carp_mobile_sensing_app/lib/src/view_models/device_descriptions.dart
@@ -44,10 +44,10 @@ class DeviceDescription {
// 'Movesense',
// 'Movesense ECG Sensor',
// Icon(Icons.watch, size: 50, color: CachetColors.CYAN)),
- CortriumDevice.DEVICE_TYPE: DeviceTypeDescriptor(
- 'Cortrium',
- 'Cortrium ECG Holter Monitor',
- Icon(Icons.monitor_heart, size: 50, color: CachetColors.CYAN)),
+ // CortriumDevice.DEVICE_TYPE: DeviceTypeDescriptor(
+ // 'Cortrium',
+ // 'Cortrium ECG Holter Monitor',
+ // Icon(Icons.monitor_heart, size: 50, color: CachetColors.CYAN)),
};
static Map get deviceStateIcon => {
diff --git a/apps/carp_mobile_sensing_app/lib/src/view_models/probe_descriptions.dart b/apps/carp_mobile_sensing_app/lib/src/view_models/probe_descriptions.dart
index 8ee226d55..3c1866fe1 100644
--- a/apps/carp_mobile_sensing_app/lib/src/view_models/probe_descriptions.dart
+++ b/apps/carp_mobile_sensing_app/lib/src/view_models/probe_descriptions.dart
@@ -245,11 +245,11 @@ class ProbeDescription {
// 'Movesense Inertial Movement Unit (IMU).',
// Icon(Icons.moving, size: 50, color: CachetColors.CYAN),
// ),
- CortriumSamplingPackage.ECG: ProbeDescriptor(
- 'C3+ ECG',
- 'C3+ Electrocardiogram.',
- Icon(Icons.monitor_heart_rounded, size: 50, color: CachetColors.BLUE),
- ),
+ // CortriumSamplingPackage.ECG: ProbeDescriptor(
+ // 'C3+ ECG',
+ // 'C3+ Electrocardiogram.',
+ // Icon(Icons.monitor_heart_rounded, size: 50, color: CachetColors.BLUE),
+ // ),
};
static Map get probeStateLabel => {
diff --git a/apps/carp_mobile_sensing_app/pubspec.yaml b/apps/carp_mobile_sensing_app/pubspec.yaml
index 30cb88725..134a0798d 100644
--- a/apps/carp_mobile_sensing_app/pubspec.yaml
+++ b/apps/carp_mobile_sensing_app/pubspec.yaml
@@ -13,10 +13,17 @@ platforms:
ios:
dependencies:
+ battery_plus: ^6.2.3
+ device_calendar: ^4.3.1
+ device_info_plus: ^12.1.0
flutter:
sdk: flutter
flutter_launcher_icons: ^0.14.0
- permission_handler: ^11.0.0
+ flutter_local_notifications: ^19.4.2
+ location: ^8.0.1
+ mdsflutter: ^2.3.1
+ package_info_plus: ^8.3.1
+ permission_handler: '>=11.0.0 <13.0.0'
#carp_serializable: ^1.1.0
#carp_core: ^0.30.0
@@ -35,7 +42,10 @@ dependencies:
# carp_movisens_package: ^0.32.0
research_package: ^2.0.0
- # health: ^8.1.0
+ shared_preferences: ^2.5.3
+ sqflite: ^2.4.2
+ health: ^13.2.0
+ flutter_blue_plus: ^1.36.8
# Overriding carp libraries to use the local copy
dependency_overrides:
@@ -69,8 +79,8 @@ dependency_overrides:
path: ../../backends/carp_webservices/
carp_movesense_package:
path: ../../packages/carp_movesense_package/
- carp_cortrium_package:
- path: ../../../carp_cortrium_package/
+ # carp_cortrium_package:
+ # path: ../../../carp_cortrium_package/
# research_package:
# path: ../../../../research.package/
@@ -89,14 +99,17 @@ dependency_overrides:
git: https://github.com/bardram/device_calendar
# due to this issue https://github.com/petri-lipponen-movesense/mdsflutter/issues/36
- mdsflutter:
- git:
- url: https://github.com/Panosfunk/mdsflutter.git
- ref: master
-
- # due to this issue https://github.com/cph-cachet/carp_studies_app/issues/427
- polar: 7.5.1
+ # mdsflutter:
+ # git:
+ # url: https://github.com/Panosfunk/mdsflutter.git
+ # ref: master
+ polar: 7.7.1
+ # load polar from https://github.com/iarata/polar due to device_info_plus conflict
+ # polar:
+ # git:
+ # url: https://github.com/iarata/polar.git
+ # ref: master
dev_dependencies:
flutter_test:
diff --git a/backends/carp_backend/pubspec.yaml b/backends/carp_backend/pubspec.yaml
index 45b7d04af..c30cecdce 100644
--- a/backends/carp_backend/pubspec.yaml
+++ b/backends/carp_backend/pubspec.yaml
@@ -52,7 +52,7 @@ dev_dependencies:
json_serializable: any
test: any
flutter_lints: any
- shared_preferences: ^2.2.3
+ shared_preferences: ^2.5.3
flutter:
uses-material-design: true # need this since both RP and carp_webservices uses MD
diff --git a/carp_mobile_sensing/example/android/gradle/wrapper/gradle-wrapper.properties b/carp_mobile_sensing/example/android/gradle/wrapper/gradle-wrapper.properties
index 7bb2df6ba..d0e1f42f8 100644
--- a/carp_mobile_sensing/example/android/gradle/wrapper/gradle-wrapper.properties
+++ b/carp_mobile_sensing/example/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,6 @@
+#Thu Oct 09 14:20:19 CEST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
diff --git a/carp_mobile_sensing/pubspec.yaml b/carp_mobile_sensing/pubspec.yaml
index b7569b60b..c69e8ff1f 100644
--- a/carp_mobile_sensing/pubspec.yaml
+++ b/carp_mobile_sensing/pubspec.yaml
@@ -36,7 +36,7 @@ dependencies:
flutter_timezone: ^4.0.0 # For getting local time zone for scheduling notifications
# probe-dependent plugins
- device_info_plus: '>=9.0.0 <12.0.0'
+ device_info_plus: ^12.1.0
sensors_plus: ^6.0.0
battery_plus: ^6.0.0
diff --git a/packages/carp_audio_package/pubspec.yaml b/packages/carp_audio_package/pubspec.yaml
index 5122ea419..758eaef1b 100644
--- a/packages/carp_audio_package/pubspec.yaml
+++ b/packages/carp_audio_package/pubspec.yaml
@@ -16,7 +16,7 @@ dependencies:
carp_mobile_sensing: ^1.11.0
json_annotation: ^4.8.0
- permission_handler: ^11.0.0
+ permission_handler: '>=11.0.0 <13.0.0'
flutter_sound: ^9.17.0 # audio probe
noise_meter: ^5.0.0 # measuring noise level
stats: ^2.0.0
diff --git a/packages/carp_communication_package/pubspec.yaml b/packages/carp_communication_package/pubspec.yaml
index 524464655..846050a4d 100644
--- a/packages/carp_communication_package/pubspec.yaml
+++ b/packages/carp_communication_package/pubspec.yaml
@@ -24,7 +24,7 @@ dependencies:
call_e_log: ^0.0.4
# device_calendar: ^4.3.2
crypto: ^3.0.1
- permission_handler: ^11.1.0
+ permission_handler: '>=11.0.0 <13.0.0'
# Overriding carp libraries to use the local copy.
# Remove this before release of package.
diff --git a/packages/carp_context_package/pubspec.yaml b/packages/carp_context_package/pubspec.yaml
index 740cbdc75..343f76495 100644
--- a/packages/carp_context_package/pubspec.yaml
+++ b/packages/carp_context_package/pubspec.yaml
@@ -20,7 +20,7 @@ dependencies:
carp_mobile_sensing: ^1.10.0
json_annotation: ^4.8.0
- permission_handler: ^11.0.0
+ permission_handler: '>=11.0.0 <13.0.0'
weather: ^3.1.0
air_quality: ^4.0.0
flutter_activity_recognition: ^4.0.0
diff --git a/packages/carp_esense_package/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/carp_esense_package/example/android/gradle/wrapper/gradle-wrapper.properties
index 296b146b7..6f8f8899b 100644
--- a/packages/carp_esense_package/example/android/gradle/wrapper/gradle-wrapper.properties
+++ b/packages/carp_esense_package/example/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Fri Jun 23 08:50:38 CEST 2017
+#Tue Oct 07 09:31:55 CEST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
diff --git a/packages/carp_health_package/pubspec.yaml b/packages/carp_health_package/pubspec.yaml
index 7af0eec2d..f6650de9c 100755
--- a/packages/carp_health_package/pubspec.yaml
+++ b/packages/carp_health_package/pubspec.yaml
@@ -19,7 +19,7 @@ dependencies:
carp_core: ^1.8.0
carp_mobile_sensing: ^1.11.0
- health: ^12.1.0
+ health: ^13.2.0
json_annotation: ^4.8.0
# Overriding carp libraries to use the local copy