Skip to content

Commit 1c2b919

Browse files
committed
Fix android building
1 parent be15d52 commit 1c2b919

10 files changed

Lines changed: 77 additions & 95 deletions

File tree

apps/carp_mobile_sensing_app/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>12.0</string>
24+
<string>13.0</string>
2525
</dict>
2626
</plist>

apps/carp_mobile_sensing_app/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 40 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1111
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
1212
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13+
54AA01F4112BB55AF6F3FB8A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85D4562AC19498C44634738E /* Pods_Runner.framework */; };
1314
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
1415
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
15-
8579A77998212F36726877AC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D9096F33A852F3AF57CB3C1 /* Pods_Runner.framework */; };
1616
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1717
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1818
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@@ -43,17 +43,18 @@
4343
/* End PBXCopyFilesBuildPhase section */
4444

4545
/* Begin PBXFileReference section */
46-
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 = "<group>"; };
4746
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
4847
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
48+
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 = "<group>"; };
4949
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
5050
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
5151
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
5252
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
5353
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
54-
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 = "<group>"; };
54+
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
55+
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 = "<group>"; };
5556
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
56-
7D9096F33A852F3AF57CB3C1 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
57+
85D4562AC19498C44634738E /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5758
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
5859
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
5960
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -64,7 +65,7 @@
6465
ABAFDD0B2D9E8FCB00691BDF /* CoreAudioTypes.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudioTypes.framework; path = System/Library/Frameworks/CoreAudioTypes.framework; sourceTree = SDKROOT; };
6566
ABAFDD0D2D9E90AF00691BDF /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
6667
ABAFDD152D9ECA9100691BDF /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
67-
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 = "<group>"; };
68+
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 = "<group>"; };
6869
/* End PBXFileReference section */
6970

7071
/* Begin PBXFrameworksBuildPhase section */
@@ -74,7 +75,7 @@
7475
files = (
7576
ABAFDD0E2D9E90AF00691BDF /* CoreAudio.framework in Frameworks */,
7677
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
77-
8579A77998212F36726877AC /* Pods_Runner.framework in Frameworks */,
78+
54AA01F4112BB55AF6F3FB8A /* Pods_Runner.framework in Frameworks */,
7879
);
7980
runOnlyForDeploymentPostprocessing = 0;
8081
};
@@ -91,9 +92,9 @@
9192
09F22D635E2A50491278A6C9 /* Pods */ = {
9293
isa = PBXGroup;
9394
children = (
94-
7523FE4B8B18392943128232 /* Pods-Runner.debug.xcconfig */,
95-
D10B79D93537C018E18CFF62 /* Pods-Runner.release.xcconfig */,
96-
1312C27C8258C4558AABBC37 /* Pods-Runner.profile.xcconfig */,
95+
E1ACD7C2F1D200D126D40CD1 /* Pods-Runner.debug.xcconfig */,
96+
19A80A4EBFB3316565C8DD86 /* Pods-Runner.release.xcconfig */,
97+
79DE2EDEE9687F42D770FE5A /* Pods-Runner.profile.xcconfig */,
9798
);
9899
path = Pods;
99100
sourceTree = "<group>";
@@ -111,14 +112,15 @@
111112
children = (
112113
ABAFDD0D2D9E90AF00691BDF /* CoreAudio.framework */,
113114
ABAFDD0B2D9E8FCB00691BDF /* CoreAudioTypes.framework */,
114-
7D9096F33A852F3AF57CB3C1 /* Pods_Runner.framework */,
115+
85D4562AC19498C44634738E /* Pods_Runner.framework */,
115116
);
116117
name = Frameworks;
117118
sourceTree = "<group>";
118119
};
119120
9740EEB11CF90186004384FC /* Flutter */ = {
120121
isa = PBXGroup;
121122
children = (
123+
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
122124
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
123125
9740EEB21CF90195004384FC /* Debug.xcconfig */,
124126
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
@@ -189,14 +191,14 @@
189191
isa = PBXNativeTarget;
190192
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
191193
buildPhases = (
192-
C36405A17497DF113203C7E0 /* [CP] Check Pods Manifest.lock */,
194+
1FB35733271CF8C777A99D41 /* [CP] Check Pods Manifest.lock */,
193195
9740EEB61CF901F6004384FC /* Run Script */,
194196
97C146EA1CF9000F007C117D /* Sources */,
195197
97C146EB1CF9000F007C117D /* Frameworks */,
196198
97C146EC1CF9000F007C117D /* Resources */,
197199
9705A1C41CF9048500538489 /* Embed Frameworks */,
198200
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
199-
97CF6E85DDE31A9E4E5CD206 /* [CP] Copy Pods Resources */,
201+
C08D0469E81CB0D1E7D56AC1 /* [CP] Copy Pods Resources */,
200202
);
201203
buildRules = (
202204
);
@@ -274,6 +276,28 @@
274276
/* End PBXResourcesBuildPhase section */
275277

276278
/* Begin PBXShellScriptBuildPhase section */
279+
1FB35733271CF8C777A99D41 /* [CP] Check Pods Manifest.lock */ = {
280+
isa = PBXShellScriptBuildPhase;
281+
buildActionMask = 2147483647;
282+
files = (
283+
);
284+
inputFileListPaths = (
285+
);
286+
inputPaths = (
287+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
288+
"${PODS_ROOT}/Manifest.lock",
289+
);
290+
name = "[CP] Check Pods Manifest.lock";
291+
outputFileListPaths = (
292+
);
293+
outputPaths = (
294+
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
295+
);
296+
runOnlyForDeploymentPostprocessing = 0;
297+
shellPath = /bin/sh;
298+
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";
299+
showEnvVarsInLog = 0;
300+
};
277301
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
278302
isa = PBXShellScriptBuildPhase;
279303
alwaysOutOfDate = 1;
@@ -305,7 +329,7 @@
305329
shellPath = /bin/sh;
306330
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
307331
};
308-
97CF6E85DDE31A9E4E5CD206 /* [CP] Copy Pods Resources */ = {
332+
C08D0469E81CB0D1E7D56AC1 /* [CP] Copy Pods Resources */ = {
309333
isa = PBXShellScriptBuildPhase;
310334
buildActionMask = 2147483647;
311335
files = (
@@ -322,28 +346,6 @@
322346
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
323347
showEnvVarsInLog = 0;
324348
};
325-
C36405A17497DF113203C7E0 /* [CP] Check Pods Manifest.lock */ = {
326-
isa = PBXShellScriptBuildPhase;
327-
buildActionMask = 2147483647;
328-
files = (
329-
);
330-
inputFileListPaths = (
331-
);
332-
inputPaths = (
333-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
334-
"${PODS_ROOT}/Manifest.lock",
335-
);
336-
name = "[CP] Check Pods Manifest.lock";
337-
outputFileListPaths = (
338-
);
339-
outputPaths = (
340-
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
341-
);
342-
runOnlyForDeploymentPostprocessing = 0;
343-
shellPath = /bin/sh;
344-
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";
345-
showEnvVarsInLog = 0;
346-
};
347349
/* End PBXShellScriptBuildPhase section */
348350

349351
/* Begin PBXSourcesBuildPhase section */
@@ -439,7 +441,7 @@
439441
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
440442
GCC_WARN_UNUSED_FUNCTION = YES;
441443
GCC_WARN_UNUSED_VARIABLE = YES;
442-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
444+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
443445
MTL_ENABLE_DEBUG_INFO = NO;
444446
SDKROOT = iphoneos;
445447
SUPPORTED_PLATFORMS = iphoneos;
@@ -580,7 +582,7 @@
580582
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
581583
GCC_WARN_UNUSED_FUNCTION = YES;
582584
GCC_WARN_UNUSED_VARIABLE = YES;
583-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
585+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
584586
MTL_ENABLE_DEBUG_INFO = YES;
585587
ONLY_ACTIVE_ARCH = YES;
586588
SDKROOT = iphoneos;
@@ -633,7 +635,7 @@
633635
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
634636
GCC_WARN_UNUSED_FUNCTION = YES;
635637
GCC_WARN_UNUSED_VARIABLE = YES;
636-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
638+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
637639
MTL_ENABLE_DEBUG_INFO = NO;
638640
SDKROOT = iphoneos;
639641
SUPPORTED_PLATFORMS = iphoneos;

apps/carp_mobile_sensing_app/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import 'package:carp_movisens_package/carp_movisens_package.dart';
2020
import 'package:carp_health_package/health_package.dart';
2121
import 'package:health/health.dart';
2222
// import 'package:carp_movesense_package/carp_movesense_package.dart';
23-
import 'package:carp_cortrium_package/carp_cortrium_package.dart';
23+
// import 'package:carp_cortrium_package/carp_cortrium_package.dart';
2424

2525
import 'package:carp_webservices/carp_auth/carp_auth.dart';
2626
import 'package:carp_webservices/carp_services/carp_services.dart';

apps/carp_mobile_sensing_app/lib/src/app.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ class LoadingPage extends StatelessWidget {
2020
///
2121
/// Returns true when successfully done.
2222
Future<bool> init(BuildContext context) async {
23-
print('LoadingPage.init() - Starting initialization...');
24-
2523
// Request all necessary permissions upfront
26-
print('LoadingPage.init() - Requesting permissions...');
2724
await Permission.locationWhenInUse.request();
2825
await Permission.locationAlways.request();
2926
await Permission.activityRecognition.request();
@@ -33,11 +30,9 @@ class LoadingPage extends StatelessWidget {
3330
if (Theme.of(context).platform == TargetPlatform.android) {
3431
await Permission.notification.request();
3532
}
36-
print('LoadingPage.init() - Permissions requested.');
3733

3834
// Initialize and use the CAWS backend if not in local deployment mode
3935
if (bloc.deploymentMode != DeploymentMode.local) {
40-
print('LoadingPage.init() - Initializing CAWS backend...');
4136
await CarpBackend().initialize();
4237
await CarpBackend().authenticate();
4338

@@ -52,11 +47,8 @@ class LoadingPage extends StatelessWidget {
5247
CarpService().study = bloc.study;
5348
}
5449

55-
print('LoadingPage.init() - Initializing sensing...');
5650
await bloc.sensing.initialize();
57-
print('LoadingPage.init() - Sensing initialized.');
5851

59-
print('LoadingPage.init() - Initialization complete!');
6052
return true;
6153
}
6254

apps/carp_mobile_sensing_app/lib/src/blocs/local_study_protocol_manager.dart

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -315,23 +315,23 @@ class LocalStudyProtocolManager implements StudyProtocolManager {
315315
//
316316
// Known DTU C3+ devices: ED:AD:D4:3D:3F:72
317317

318-
var c3 = CortriumDevice(
319-
name: 'Cortrium C3+',
320-
btleAddress: 'ED:AD:D4:3D:3F:72',
321-
);
318+
// var c3 = CortriumDevice(
319+
// name: 'Cortrium C3+',
320+
// btleAddress: 'ED:AD:D4:3D:3F:72',
321+
// );
322322

323-
protocol.addConnectedDevice(c3, phone);
323+
// protocol.addConnectedDevice(c3, phone);
324324

325-
protocol.addTaskControl(
326-
ImmediateTrigger(),
327-
BackgroundTask(measures: [
328-
Measure(type: CortriumSamplingPackage.ECG),
329-
// Measure(type: CortriumSamplingPackage.BUTTON),
330-
Measure(type: CortriumSamplingPackage.BATTERY),
331-
Measure(type: CortriumSamplingPackage.ACCELEROMETER),
332-
Measure(type: CortriumSamplingPackage.HR),
333-
]),
334-
c3);
325+
// protocol.addTaskControl(
326+
// ImmediateTrigger(),
327+
// BackgroundTask(measures: [
328+
// Measure(type: CortriumSamplingPackage.ECG),
329+
// // Measure(type: CortriumSamplingPackage.BUTTON),
330+
// Measure(type: CortriumSamplingPackage.BATTERY),
331+
// Measure(type: CortriumSamplingPackage.ACCELEROMETER),
332+
// Measure(type: CortriumSamplingPackage.HR),
333+
// ]),
334+
// c3);
335335

336336
//
337337
// --------- HEALTH PACKAGE EXAMPLES -------------

apps/carp_mobile_sensing_app/lib/src/blocs/sensing.dart

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Sensing {
2929
SamplingPackageRegistry().register(MovisensSamplingPackage());
3030
SamplingPackageRegistry().register(HealthSamplingPackage());
3131
// SamplingPackageRegistry().register(MovesenseSamplingPackage());
32-
SamplingPackageRegistry().register(CortriumSamplingPackage());
32+
// SamplingPackageRegistry().register(CortriumSamplingPackage());
3333

3434
// Register the CARP data manager for uploading data back to CAWS.
3535
// This is needed in both LOCAL and CAWS deployments, since a local study
@@ -89,29 +89,24 @@ class Sensing {
8989
/// Initialize and set up sensing.
9090
Future<void> initialize() async {
9191
info('Initializing $runtimeType - mode: ${bloc.deploymentMode}');
92-
print('Sensing.initialize() - Step 1: Starting...');
9392

9493
switch (bloc.deploymentMode) {
9594
case DeploymentMode.local:
96-
print('Sensing.initialize() - Step 2: Creating local deployment service...');
9795
// Use the local, phone-based deployment service.
9896
deploymentService = SmartphoneDeploymentService();
9997

10098
// Get the protocol from the local study protocol manager.
10199
// Note that the study id is not used.
102-
print('Sensing.initialize() - Step 3: Getting study protocol...');
103100
StudyProtocol protocol =
104101
await LocalStudyProtocolManager().getStudyProtocol('');
105102

106103
// Deploy this protocol using the on-phone deployment service.
107104
// Reuse the study deployment id, if this is stored on the phone.
108-
print('Sensing.initialize() - Step 4: Creating study deployment...');
109105
_status = await SmartphoneDeploymentService().createStudyDeployment(
110106
protocol,
111107
);
112108

113109
// Save the study on the phone for later use.
114-
print('Sensing.initialize() - Step 5: Saving study...');
115110
bloc.study = SmartphoneStudy(
116111
studyDeploymentId: _status!.studyDeploymentId,
117112
deviceRoleName: _status!.primaryDeviceStatus!.device.roleName,
@@ -130,19 +125,15 @@ class Sensing {
130125

131126
// Configure the client manager with the deployment service selected above
132127
// (local or CAWS), add the study, and deploy it.
133-
print('Sensing.initialize() - Step 6: Configuring client manager...');
134128
await SmartPhoneClientManager().configure(
135129
deploymentService: deploymentService,
136130
askForPermissions: true, // Allow the system to request permissions as needed
137131
);
138132

139-
print('Sensing.initialize() - Step 7: Adding study...');
140133
study = await SmartPhoneClientManager().addStudy(bloc.study!);
141134

142-
print('Sensing.initialize() - Step 8: Trying deployment...');
143135
await controller?.tryDeployment(useCached: bloc.useCachedStudyDeployment);
144136

145-
print('Sensing.initialize() - Step 9: Configuring controller...');
146137
try {
147138
await controller?.configure().timeout(
148139
Duration(seconds: 30),
@@ -153,16 +144,13 @@ class Sensing {
153144
);
154145
} catch (error) {
155146
print('Sensing.initialize() - ERROR during configure: $error');
156-
print('Sensing.initialize() - Continuing anyway...');
157147
}
158148

159149
// Listen on the measurements stream and print them as json.
160-
print('Sensing.initialize() - Step 10: Setting up measurement listener...');
161150
SmartPhoneClientManager()
162151
.measurements
163152
.listen((measurement) => print(toJsonString(measurement)));
164153

165154
info('$runtimeType initialized');
166-
print('Sensing.initialize() - Complete!');
167155
}
168156
}

0 commit comments

Comments
 (0)