Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
acb85a8
android version issue on apk, working on release-on-tag github action
Panosfunk Oct 13, 2025
7646b5d
Merge branch 'test' into conf-hot-fixes
Panosfunk Oct 17, 2025
a2a4404
fixing missing status top bar in ios, minor visual details
Panosfunk Oct 20, 2025
a068946
fixing persistent messages through different studies
Panosfunk Oct 20, 2025
0b6bc95
fix of ! operator
bardram Oct 24, 2025
c1ea94e
announcements page fix, message details page ui changes, removing unu…
Panosfunk Oct 24, 2025
694a652
Fix of "day in study" in #523
bardram Oct 24, 2025
62c8ee8
Small update to translations
bardram Oct 24, 2025
84efaed
Fix of cached data across studies - #523
bardram Oct 24, 2025
f2f1b76
Update view_model.dart
bardram Oct 24, 2025
be54971
adding new images for health connection page
Panosfunk Oct 26, 2025
979ef99
fixing status bar color appearing darker than page, removing unnecess…
Panosfunk Oct 29, 2025
8dc2dfd
informed consent from backend instead of locally, reverting notificat…
Panosfunk Nov 7, 2025
cb00940
Merge pull request #521 from carp-dk/test
Panosfunk Nov 11, 2025
b45ca92
moving to carp_themes_package instead of research package theme
Panosfunk Nov 11, 2025
a0d78d5
bumping version code
Panosfunk Nov 11, 2025
3764147
Merge remote-tracking branch 'origin' into carp_themes_package_integr…
Panosfunk Nov 11, 2025
d9d0fd2
fixing changelog
Panosfunk Nov 11, 2025
ced8d79
formatting
Panosfunk Nov 11, 2025
93e0f01
Merge pull request #535 from carp-dk/bardram-#523
Panosfunk Nov 11, 2025
f791654
formating
Panosfunk Nov 11, 2025
e81e05f
Merge branch 'conf-hot-fixes' into carp_themes_package_integration
Panosfunk Nov 12, 2025
0849d3b
Merge pull request #543 from carp-dk/carp_themes_package_integration
Panosfunk Nov 12, 2025
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
23 changes: 18 additions & 5 deletions .github/workflows/create_release_on_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@ jobs:
name: Create Release and Upload APK
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master

- name: Set up JDK 1.8
uses: actions/setup-java@v4
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'adopt' # See 'Supported distributions' for available options
java-version: '17'

# - name: Set up JDK 17
# uses: actions/setup-java@v4
# with:
# distribution: 'adopt' # See 'Supported distributions' for available options
# java-version: '17'

- name: Cache Flutter
id: cache-flutter
uses: actions/cache@v3
Expand All @@ -28,6 +31,16 @@ jobs:
~/.pub-cache
key: flutter-${{ hashFiles('**/pubspec.lock') }}

- name: Cache Gradle
id: cache-gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper/
key: gradle-ubuntu-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}


- if: ${{ steps.cache-flutter.outputs.cache-hit != 'true' }}
name: Install Flutter
run: git clone https://github.com/flutter/flutter.git --depth 1 -b stable $FOLDER
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.2.0

* moving to carp_themes_package instead of research package themes

## 4.1.1

- small visual fixes
Expand Down
19 changes: 6 additions & 13 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ plugins {
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
def localPropertiesFile = project.rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def keyProperties = new Properties()
def keyPropertiesFile = rootProject.file('key.properties')
def keyPropertiesFile = project.rootProject.file('key.properties')
def signingConfigExists = false

if (keyPropertiesFile.exists()) {
Expand All @@ -23,15 +23,8 @@ if (keyPropertiesFile.exists()) {
}
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') ?: '1'
def flutterVersionName = localProperties.getProperty('flutter.versionName') ?: '1.0'

android {
namespace "dk.carp.studies_app"
Expand Down Expand Up @@ -88,10 +81,10 @@ android {
debugSymbolLevel 'SYMBOL_TABLE'
}
if (signingConfigExists) {
logger.error('storeFile found, signing with release build.')
logger.info('storeFile found, signing with release build.')
signingConfig signingConfigs.release
} else {
logger.error('No storeFile found or null. Skipping signing of release build.')
logger.info('No storeFile found or null. Skipping signing of release build.')
signingConfig signingConfigs.debug
}
}
Expand Down
2 changes: 0 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ allprojects {
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

Expand Down
Binary file added assets/instructions/apple_health_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/lang/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@
"pages.profile.device_role": "Engedsrolle",
"pages.profile.contact": "Kontakt forsker",
"pages.profile.privacy": "Fortrolighedspolitik",
"pages.profile.study_website": "Studiw Hjemmeside",
"pages.profile.study_website": "Hjemmeside for studiet",
"pages.profile.leave_study": "Forlad studie",
"pages.profile.log_out": "Log ud",
"pages.profile.log_out": "Forlad studie & Log ud",
"pages.profile.log_out.confirmation": "Du er ved at forlade dette studie og logge af. Operativsystemet vil åbne en browser for at logge dig ud. Er du sikker?",
"pages.profile.leave_study.confirmation": "Du er ved at forlade studiet. Du vil ikke længere deltage i dette studie. Er du sikker?",
"announcements": "Annonceringer",
Expand Down
6 changes: 3 additions & 3 deletions assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@
"pages.profile.device_id": "Device ID",
"pages.profile.contact": "Contact researcher",
"pages.profile.privacy": "Privacy policy",
"pages.profile.study_website": "Study Website",
"pages.profile.study_website": "Study website",
"pages.profile.leave_study": "Leave study",
"pages.profile.log_out": "Log out",
"pages.profile.log_out": "Leave study & Log out",
"pages.profile.log_out.confirmation": "You are about to leave this study and log out. The operating system will open a browser to log you out. Are you sure?",
"pages.profile.leave_study.confirmation": "You are about to leave the study. You will no longer participate in this study. Are you sure?",
"announcements": "Announcements",
Expand Down Expand Up @@ -244,4 +244,4 @@
"tasks.participant_data.phone_number.country": "Country code",
"tasks.participant_data.phone_number.phone_number": "Phone No.",
"tasks.participant_data.review.title": "Review"
}
}
5 changes: 3 additions & 2 deletions assets/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@
"pages.profile.account_id": "Id Usuario",
"pages.profile.contact": "Contactar investigador",
"pages.profile.privacy": "Política de privacidad",
"pages.profile.study_website": "Página web del estudio",
"pages.profile.leave_study": "Abandonar el estudio",
"pages.profile.log_out": "Cerrar sesión",
"pages.profile.log_out": "Cerrar estudio & sesión",
"pages.profile.log_out.confirmation": "Estás a punto de cerrar sesión et abandonar el estudio. ¿Estás seguro?",
"pages.profile.leave_study.confirmation": "Estás a punto de abandonar el estudio. Dejarás de participar en el es estudio. ¿Estás seguro?",
"announcement": "Anuncio",
Expand Down Expand Up @@ -121,4 +122,4 @@
"pages.devices.connection.step.confirm.title": "está conectado!",
"pages.devices.connection.step.confirm.1": "El",
"pages.devices.connection.step.confirm.2": " ha sido connectado satisfactoriamente al estudio y está listo para empezar a detectar."
}
}
12 changes: 6 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ PODS:
- sqflite_darwin (0.0.4):
- Flutter
- FlutterMacOS
- SwiftProtobuf (1.31.1)
- SwiftProtobuf (1.32.0)
- url_launcher_ios (0.0.1):
- Flutter
- video_player_avfoundation (0.0.1):
Expand Down Expand Up @@ -267,7 +267,7 @@ SPEC CHECKSUMS:
oidc_ios: 16966cad509ce6850ca4ca1216c5138bef2a8726
open_settings_plus: d19f91e8a04649358a51c19b484ce2e637149d70
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880
pedometer: 1c5eaab0c6bce8eb7651f7095553b5081c9d06ed
permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
PhoneNumberKit: ec00ab8cef5342c1dc49fadb99d23fa7e66cf0ef
Expand All @@ -277,11 +277,11 @@ SPEC CHECKSUMS:
RxSwift: 4e28be97cbcfeee614af26d83415febbf2bf6f45
screen_state: 52d6e997d31bddba6417c60d9cdd22effd0320a7
sensors_plus: 6a11ed0c2e1d0bd0b20b4029d3bad27d96e0c65b
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
SwiftProtobuf: e02f51c8c2df5845657aee2d4de9d61bf50ef788
url_launcher_ios: 694010445543906933d732453a59da0a173ae33d
video_player_avfoundation: 2cef49524dd1f16c5300b9cd6efd9611ce03639b
SwiftProtobuf: 81e341191afbddd64aa031bd12862dccfab2f639
url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b
video_player_avfoundation: dd410b52df6d2466a42d28550e33e4146928280a
Zip: b3fef584b147b6e582b2256a9815c897d60ddc67

PODFILE CHECKSUM: 0f233b2493d660073cf18073d2b24e7b319ab4a8
Expand Down
2 changes: 0 additions & 2 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,5 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIStatusBarHidden</key>
<true/>
</dict>
</plist>
16 changes: 9 additions & 7 deletions lib/blocs/app_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,9 @@ class StudyAppBLoC extends ChangeNotifier {

/// Has the informed consent been accepted by the user?
bool get hasInformedConsentBeenAccepted =>
LocalSettings().participant?.hasInformedConsentBeenAccepted ?? false;
backend.getInformedConsentByRole(
study!.studyDeploymentId, study!.participantRoleName) !=
null;

set hasInformedConsentBeenAccepted(bool accepted) {
var participant = LocalSettings().participant;
Expand Down Expand Up @@ -380,6 +382,7 @@ class StudyAppBLoC extends ChangeNotifier {
/// the Study Page of the app.
Future<void> refreshMessages() async {
try {
_messages.clear();
_messages = await messageManager.getMessages();
_messages.sort((m1, m2) => m2.timestamp.compareTo(m1.timestamp));
info('Message list refreshed - count: ${_messages.length}');
Expand Down Expand Up @@ -478,14 +481,13 @@ class StudyAppBLoC extends ChangeNotifier {
/// * resetting the informed consent flow
/// * returning the user to select an invitation for another study
///
/// Note that study deployment information and data is not removed from the
/// phone. This is stored for later access. Or if the same deployment is
/// re-deployed on the phone, data from the previous deployment will be
/// available.
/// Note that study deployment information and data is removed from the
/// phone. If the same deployment is re-deployed on the phone, data from the
/// previous deployment will NOT be available.
Future<void> leaveStudy() async {
debug('$runtimeType --------- LEAVING STUDY ------------');
info('Leaving study $study');

// save and clear the UI data models
// clear the UI data models
appViewModel.clear();

// stop sensing and remove all deployment info
Expand Down
17 changes: 12 additions & 5 deletions lib/carp_study_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,14 @@ class CarpStudyAppState extends State<CarpStudyApp> {

@override
Widget build(BuildContext context) {
final carpColors = Theme.of(context).extension<CarpColors>();
final studyAppColors = Theme.of(context).extension<StudyAppColors>();

// Apply system overlay style after frame so Theme.of(context) is ready
WidgetsBinding.instance.addPostFrameCallback((_) {
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
));
});
return MaterialApp.router(
scaffoldMessengerKey: bloc.scaffoldKey,
supportedLocales: const [
Expand Down Expand Up @@ -211,14 +218,14 @@ class CarpStudyAppState extends State<CarpStudyApp> {
return supportedLocales.first; // default to EN
},
locale: bloc.localization?.locale,
theme: researchPackageTheme.copyWith(
theme: carpTheme.copyWith(
extensions: [
researchPackageTheme.extension<RPColors>()!.copyWith(
primary: carpColors?.primary,
carpTheme.extension<CarpColors>()!.copyWith(
primary: studyAppColors?.primary,
),
],
),
darkTheme: researchPackageDarkTheme,
darkTheme: carpDarkTheme,
debugShowCheckedModeBanner: true,
routerConfig: _router,
);
Expand Down
7 changes: 7 additions & 0 deletions lib/data/carp_backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,11 @@ class CarpBackend {

return uploadedConsent;
}

Future<InformedConsentInput?>? getInformedConsentByRole(
String studyDeploymentId, String? role) async {
return await CarpParticipationService()
.participation(studyDeploymentId)
.getInformedConsentByRole(role);
}
}
15 changes: 6 additions & 9 deletions lib/data/local_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ class LocalSettings {
/// See https://developer.android.com/health-and-fitness/guides/health-connect/develop/get-started#get-client
static const healthConnectPackageName = 'com.google.android.apps.healthdata';

bool isExpectedParticipantDataSet = false;
bool hasUserSeenDeviceConnectionInstructions = false;

// Keys for storing in shared preferences
static const String userKey = 'user';
static const String participantKey = 'participant';
Expand All @@ -26,8 +23,6 @@ class LocalSettings {
Participant? _participant;
SmartphoneStudy? _study;

bool hasSeenBluetoothConnectionInstructions = false;

static final LocalSettings _instance = LocalSettings._();
factory LocalSettings() => _instance;
LocalSettings._() : super();
Expand Down Expand Up @@ -109,11 +104,13 @@ class LocalSettings {
);
}

bool get hasSeenConnectionInstructions =>
hasSeenBluetoothConnectionInstructions;
bool get hasSeenBluetoothConnectionInstructions =>
Settings()
.preferences
?.getBool('hasSeenBluetoothConnectionInstructions') ??
false;

set hasSeenConnectionInstructions(bool seen) {
hasSeenBluetoothConnectionInstructions = seen;
set hasSeenBluetoothConnectionInstructions(bool seen) {
Settings().preferences?.setBool(
'hasSeenBluetoothConnectionInstructions',
seen,
Expand Down
4 changes: 2 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import 'package:cognition_package/cognition_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_themes_package/carp_themes_package.dart';

part 'blocs/app_bloc.dart';
part 'blocs/util.dart';
Expand Down Expand Up @@ -105,8 +106,7 @@ part 'ui/pages/devices_page.enable_bluetooth_dialog.dart';
part 'ui/pages/devices_page.bluetooth_connection_page.dart';
part 'ui/pages/devices_page.disconnection_dialog.dart';
part 'ui/pages/devices_page.list_title.dart';
part 'ui/pages/devices_page.health_service_connect1.dart';
part 'ui/pages/devices_page.health_service_connect2.dart';
part 'ui/pages/devices_page.health_service_connect.dart';

part 'ui/tasks/audio_task_page.dart';
part 'ui/tasks/audio_page.dart';
Expand Down
Loading