Skip to content

Commit

Permalink
Beta Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Gioele Bigini committed Mar 11, 2021
1 parent e6abd46 commit ccc5ca3
Show file tree
Hide file tree
Showing 40 changed files with 1,096 additions and 229 deletions.
Binary file added assets/app_logo_circle_broken.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/drinking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/eating.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/reading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/sleeping.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/sport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/walking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/working.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sounds/finish_bigdsc.mp3
Binary file not shown.
Binary file removed assets/sounds/light_pop.mp3
Binary file not shown.
Binary file added assets/sounds/light_pop_bigdsc.mp3
Binary file not shown.
36 changes: 34 additions & 2 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"open_source_txt": "Open Source",
"about_balance_txt": "About Balance",
"version_txt": "Version",
"build_txt": "alpha.",
"build_txt": "beta.",
"made_with_heart_txt": "Credits",
"easter_egg_txt": "Keep clicking! The new release will come out faster!",
"empty_txt": "Nothing to show here!",
Expand Down Expand Up @@ -74,7 +74,7 @@
"leave_dialog_title": "Are you sure you want to leave?",
"leave_dialog_msg": "If you leave the test will fail",
"never_show_again": "Never show again",
"tutorial_msg": "Before performing a test select eyes open or eyes closed.\nPlease maintain a straight posture and hold the phone with two hands in a vertical position at the navel level.\nThe test will last about 30 seconds, at the end of which you will feel a vibration.",
"tutorial_msg": "While performing a test, keep a straight posture and hold the phone with two hands in a vertical position at the navel level.\nThe correct positioning of the smartphone will be suggested by a beep! The analysis will start with a vibration and will last approximately 30 seconds, after which you will hear an additional beep. Remember to keep your eyes open or closed as you stated throughout the measurement!",
"your_personal_info_txt": "My personal data",
"general_title": "GENERAL",
"health_title": "HEALTH",
Expand Down Expand Up @@ -148,6 +148,38 @@
"about_balance_title": "About Balance",
"about_balance_msg": "Balance is an effort of Computer Science researchers at the University of Urbino with the aim of providing a tool to measure your posture in a few seconds, with your smartphone.",
"cool_btn": "Cool!",
"back_home_btn": "Back to Home Screen",
"report_title": "Support",
"report_issue_title": "Report an Issue",
"report_title_txt": "Report an Issue",
"report_description_txt": "Please describe...",
"report_snack_true_txt": "Report sent successfully!",
"report_snack_false_txt": "You should write something first!",
"report_send_txt": "Send Report",
"credits_description_txt": "Balance is a smartphone application developed by the researchers of the University of Urbino to measure your stability. It is designed to be easy to use and quick enough to give stabilometric indices in a few seconds. It is part of the iPhD funded by Regione Marche and led by Professor E. Lattanzi. The PhD is a joint initiative of the University of Urbino, Politecnica delle Marche, TU Wien and the company Digit Srl. All trademarks mentioned belong to their respective owners.",
"credits_authors_txt": "Authors",
"credits_authors_bigini_txt": "iPh.D Student @ University of Urbino",
"credits_authors_freschi_txt": "Researcher @ University of Urbino",
"credits_authors_lattanzi_txt": "Associate Professor @ University of Urbino",
"credits_developers_txt": "Developers",
"credits_developers_bigini_txt": "Software Developer @ University of Urbino",
"credits_developers_difrancesco_txt": "Development Support @ DIGIT Srl",
"credits_developers_calisti_txt": "Original Design & Code @ University of Urbino",
"credits_collaborators_txt": "Collaborators",
"credits_collaborators_klopfenstein_txt": "Infrastructure Provider @ DIGIT Srl",
"credits_collaborators_delpriori_txt": "Infrastructure Provider @ DIGIT Srl",
"credits_collaborators_bogliolo_txt": "Data Processor @ DIGIT Srl",
"credits_foundation_title": "Foundations",
"credits_sponsors_partners_txt": "Partners and Sponsors",
"test_measurement_ok_title": "Measurement performed correctly",
"test_measurement_ok_txt": "Congratulations! When you take a measurement we check your parameters. Some of these provide an indication of correct execution and it seems that everything went well!",
"test_measurement_wrong_title": "Suspicious Measurement",
"test_measurement_wrong_txt": "This measurement shows erratic results. If you did not execute the test correctly, try it again. If the problem persists, contact the support.",
"test_backend_ok_title": "Measurement successfully sent to the server",
"test_backend_ok_txt": "Your measurement has been successfully recorded. You are actively contributing to Balance's research and development!",
"test_backend_wrong_title": "Your measurement was not saved",
"test_backend_wrong_txt": "What a pity! The measurement did not reach our servers (maybe they were resting, never sleep a wink). By submitting the results you will help our researchers better understand stability. Please connect to the internet next time.",
"intro_backend_snack_txt": "Unable to retrieve the unique Token. Please activate your Internet connection and try again. If the problem persists, try again in a few hours.",
"privacy_title": "Balance Terms and Conditions and Privacy Policy",
"privacy_finality_title": "Purposes and Methods of Processing",
"privacy_finality_txt": "The processing of your personal data through the Balance application is carried out for the realization of the scientific purposes of the \"Smartphone-based Postural Stability Monitoring System for Falls Prevention in the Elderly\" project. The Project was drawn up in accordance with the methodological standards of the disciplinary sector concerned and is filed with the Department of Pure and Applied Sciences of the University of Urbino Carlo Bo, where it will be kept for five years from the scheduled conclusion of the research itself. Your personal data will be processed only to the extent that they are indispensable in relation to the objective of the project, in compliance with the provisions of current legislation on the protection of personal data and in accordance with the provisions of the general authorizations of the Guarantor Authority for the protection of personal data. Your data will be processed exclusively by the Data Controller, by the Scientific Manager and/or by authorized subjects in the context of the realization of the Project, with automated and non-automated tools, exclusively to allow the carrying out of the research in question and all the related operations and related activities, including administrative ones, conducted by the University of Urbino in collaboration with Digit srl. The data will be processed electronically by adopting pseudonymisation: the user's identity will never be requested but a unique identifier will be associated with each installation that will allow the data provided by the same user to be correlated over time. Furthermore, although the experimentation does not fall into medical devices, the use of Balance will constitute a service for users through personal monitoring of their progress.",
Expand Down
36 changes: 34 additions & 2 deletions assets/translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"open_source_txt": "Open Source",
"about_balance_txt": "Riguardo a Balance",
"version_txt": "Versione",
"build_txt": "alpha.",
"build_txt": "beta.",
"made_with_heart_txt": "Crediti",
"easter_egg_txt": "Continua a cliccare! La nuova release uscirà più velocemente!",
"empty_txt": "Non c'è nulla da vedere qui!",
Expand Down Expand Up @@ -74,7 +74,7 @@
"leave_dialog_title": "Sei sicuro di voler uscire?",
"leave_dialog_msg": "Se esci il test fallirà",
"never_show_again": "Non mostrare più",
"tutorial_msg": "Prima di eseguire un test seleziona occhi aperti oppure occhi chiusi. \nPer favore mantieni una postura dritta e tieni il telefono con due mani in posizione verticale all'altezza dell'ombelico. \nIl test durerà circa 30 secondi, al termine dei quali sentirai una vibrazione.",
"tutorial_msg": "Durante l'esecuzione mantieni una postura dritta e tieni il telefono con due mani in posizione verticale all'altezza dell'ombelico.\nIl corretto posizionamento del telefono ti verrà suggerito da un segnale acustico! L'analisi inizierà con una vibrazione e durerà circa 30 secondi, al termine dei quali sentirai un'ulteriore segnale acustico. Ricorda di tenere gli occhi aperti o chiusi come hai dichiarato per tutto il tempo della misurazione!",
"your_personal_info_txt": "Le mie informazioni personali",
"general_title": "GENERALE",
"health_title": "SALUTE",
Expand Down Expand Up @@ -148,6 +148,38 @@
"about_balance_title": "Riguardo a Balance",
"about_balance_msg": "Balance nasce dallo sforzo dei ricercatori di Computer Science dell'Università di Urbino con l'obbiettivo di fornire uno strumento per misurare la propria postura in pochi secondi, con il proprio smartphone.",
"cool_btn": "Figo!",
"back_home_btn": "Torna alla Schermata Principale",
"report_title": "Supporto",
"report_issue_title": "Segnala un Problema",
"report_title_txt": "Segnala Un Malfunzionamento",
"report_description_txt": "Descrivici il problema...",
"report_snack_true_txt": "Segnalazione inviata con successo!",
"report_snack_false_txt": "Prima dovresti scriverci qualcosa!",
"report_send_txt": "Invia Segnalazione",
"credits_description_txt": "Balance è un'applicazione per smartphone sviluppata dai ricercatori dell'Università degli Studi di Urbino per misurare la tua stabilità. È progettato per essere facile da usare e abbastanza veloce da fornire indici stabilometrici in pochi secondi. Fa parte del percorso di Dottorato Innovativo finanziato dalla Regione Marche e guidato dal Professor E. Lattanzi. Il Dottorato di Ricerca è un'iniziativa congiunta dell'Università degli Studi di Urbino, Politecnica delle Marche, Università Tecnica di Vienna e la società Digit Srl. Tutti i marchi citati appartengono ai rispettivi proprietari.",
"credits_authors_txt": "Autori",
"credits_authors_bigini_txt": "Studente Dottorato Innovativo @ Università degli Studi di Urbino",
"credits_authors_freschi_txt": "Ricercatore @ Università degli Studi di Urbino",
"credits_authors_lattanzi_txt": "Professore Associato @ Università degli Studi di Urbino",
"credits_developers_txt": "Sviluppatori",
"credits_developers_bigini_txt": "Sviluppatore Software @ Università degli Studi di Urbino",
"credits_developers_difrancesco_txt": "Supporto allo Sviluppo @ DIGIT Srl",
"credits_developers_calisti_txt": "Design & Codice Originale @ Università degli Studi di Urbino",
"credits_collaborators_txt": "Collaboratori",
"credits_collaborators_klopfenstein_txt": "Fornitore Infrastrutture @ DIGIT Srl",
"credits_collaborators_delpriori_txt": "Fornitore Infrastrutture @ DIGIT Srl",
"credits_collaborators_bogliolo_txt": "Titolare del Trattamento Dati @ DIGIT Srl",
"credits_foundation_title": "Fondamenti",
"credits_sponsors_partners_txt": "Sponsor e Partner",
"test_measurement_ok_title": "Misurazione eseguita correttamente",
"test_measurement_ok_txt": "Congratulazioni! Quando esegui una misurazione verifichiamo i tuoi parametri. Alcuni di questi forniscono un'indicazione riguardante la corretta esecuzione e sembra sia andato tutto bene!",
"test_measurement_wrong_title": "Misurazione Sospetta",
"test_measurement_wrong_txt": "Questa misurazione presenta dei risultati irregolari. Se non hai eseguito il test correttamente, effettualo nuovamente. Se il problema persiste, contatta i ricercatori.",
"test_backend_ok_title": "Misurazione inviata correttamente al server",
"test_backend_ok_txt": "La tua misurazione é stata registrata correttamente. Stai contribuendo attivamente alla ricerca e sviluppo di Balance!",
"test_backend_wrong_title": "La tua misurazione non é stata salvata",
"test_backend_wrong_txt": "Che peccato! La misurazione non ha raggiunto i nostri server (forse si stavano riposando, non chiudono mai occhio). Inviando i risultati aiuterai i nostri ricercatori a comprendere meglio la stabilità. Per favore, attiva la connessione alla rete internet la prossima volta.",
"intro_backend_snack_txt": "Impossibile recuperare il Token univoco. Attivare la connessione Internet e riprovare. Se il problema persiste, riprovare fra qualche ora.",
"privacy_title": "Termini e Condizioni e Informativa sulla Privacy di Balance",
"privacy_finality_title": "Finalità e Modalità del Trattamento",
"privacy_finality_txt": "Il trattamento dei Suoi dati personali attraverso l'applicazione Balance è effettuato per la realizzazione delle finalità scientifiche del Progetto \"Sistema di Monitoraggio della Stabilità Posturale basato su Smartphone\". Il Progetto è stato redatto conformemente agli standard metodologici del settore disciplinare interessato ed è depositato presso il Dipartimento di Scienze Pure e Applicate dell’Università degli Studi di Urbino Carlo Bo, ove verrà conservato per cinque anni dalla conclusione programmata della ricerca stessa. I suoi dati personali saranno trattati soltanto nella misura in cui siano indispensabili in relazione all'obiettivo del progetto, nel rispetto di quanto previsto dalla normativa vigente in materia di protezione dei dati personali e conformemente alle disposizioni di cui alle autorizzazioni generali dell’Autorità Garante per la protezione dei dati personali.I Suoi dati saranno trattati esclusivamente dal Titolare, dal Responsabile scientifico e/o da soggetti autorizzati nell’ambito della realizzazione del Progetto, con strumenti automatizzati e non, esclusivamente per consentire lo svolgimento della ricerca in parola e di tutte le relative operazioni ed attività connesse, comprese quelle amministrative, condotte dal’Università di Urbino in collaborazione con Digit srl. I dati saranno trattati mediante strumenti elettronici adottando la pseudonimizzazione: l’identità dell’utente non verrà mai richiesta ma ad ogni installazione verrà associato un identificativo univoco che consentirà di correlare nel tempo i dati forniti dallo stesso utente. Inoltre, sebbene la sperimentazione non ricada nei dispositivi di tipo medico, l’utilizzo di Balance costituirà un servizio per i soggetti utilizzatori attraverso un monitoraggio personale dei propri progressi.",
Expand Down
2 changes: 1 addition & 1 deletion ios/Flutter/.last_build_id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bdd717abda10237c2fa465b7a097dac7
f4a445f069a0b2de2c728ed6b4490eda
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ PODS:
- sqflite (0.0.2):
- Flutter
- FMDB (>= 2.7.5)
- vibration (1.7.1):
- vibration (1.7.3):
- Flutter
- wakelock (0.0.1):
- Flutter
Expand Down Expand Up @@ -83,7 +83,7 @@ SPEC CHECKSUMS:
sensors: 84eb7a30e47a649e4172b71d6e81be614c280336
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
vibration: 4f4ded27b9d0e21e4110ca43978f057412d28c44
vibration: b5a33e764c3f609a975b9dca73dce20fdde627dc
wakelock: bfc7955c418d0db797614075aabbc58a39ab5107

PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
Expand Down
2 changes: 1 addition & 1 deletion lib/bloc/main/home/countdown_bloc_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CountdownBloc extends Bloc<CountdownEvents, CountdownState> {
print("CountdownBloc.mapEventToState: startPreMeasure");
_isCountdownCancelled = false;
_countdownTimer = CountdownTimer(
Duration(milliseconds: 6000),
Duration(milliseconds: 2000),
Duration(milliseconds: 1000)
)..listen((event) { /*No-Op*/ },
onDone: () {
Expand Down
12 changes: 8 additions & 4 deletions lib/floor/test_database_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import 'package:floor/floor.dart';
///
/// See also:
/// * [Measurement]
@DatabaseView("SELECT id, creation_date, eyes_open, invalid FROM measurements", viewName: "tests")
@DatabaseView("SELECT id, creation_date, eyes_open, invalid, sent FROM measurements", viewName: "tests")
class Test {
@ColumnInfo(name: "id")
final int id;
Expand All @@ -24,15 +24,18 @@ class Test {
final bool eyesOpen;
@ColumnInfo(name: "invalid")
final bool invalid;
@ColumnInfo(name: "sent")
final bool sent;

Test({this.id, this.creationDate, this.eyesOpen, this.invalid});
Test({this.id, this.creationDate, this.eyesOpen, this.invalid, this.sent});

@override
bool operator ==(other) => other is Test &&
other.id == id &&
other.creationDate == creationDate &&
other.eyesOpen == eyesOpen &&
other.invalid == invalid;
other.invalid == invalid &&
other.sent == sent;

@override
int get hashCode {
Expand All @@ -42,9 +45,10 @@ class Test {
result = prime * result + creationDate.hashCode;
result = prime * result + eyesOpen.hashCode;
result = prime * result + invalid.hashCode;
result = prime * result + sent.hashCode;
return result;
}

@override
String toString() => "Test(id=$id, creationDate=$creationDate, eyesOpen=$eyesOpen, invalid=$invalid)";
String toString() => "Test(id=$id, creationDate=$creationDate, eyesOpen=$eyesOpen, invalid=$invalid, sent=$sent)";
}
6 changes: 4 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'dart:io';
import 'package:balance_app/bloc/intro_state/on_boarding_data_bloc.dart';
import 'package:balance_app/bloc/main/home/countdown_bloc_impl.dart';
import 'package:balance_app/screens/calibration/quick_calibration_screen.dart';
import 'package:balance_app/screens/issues/issues_screen.dart';
import 'package:balance_app/screens/res/colors.dart';
import 'package:balance_app/screens/res/theme.dart';
import 'package:device_info/device_info.dart';
Expand Down Expand Up @@ -41,7 +42,7 @@ Future<void> main() async {
var sdkInt = androidInfo.version.sdkInt;
var manufacturer = androidInfo.manufacturer;
var model = androidInfo.model;
PreferenceManager.updateSystemInfo(producer: manufacturer, model: model, appVersion: "alpha.5", osVersion: "Android "+release+" SDK "+sdkInt.toString());
PreferenceManager.updateSystemInfo(producer: manufacturer, model: model, appVersion: "beta.5", osVersion: "Android "+release+" SDK "+sdkInt.toString());
}

if (Platform.isIOS) {
Expand All @@ -50,7 +51,7 @@ Future<void> main() async {
var version = iosInfo.systemVersion;
var name = iosInfo.name;
//var model = iosInfo.model;
PreferenceManager.updateSystemInfo(producer: "Apple", model: name, appVersion: "alpha.5", osVersion: systemName+" "+version);
PreferenceManager.updateSystemInfo(producer: "Apple", model: name, appVersion: "beta.5", osVersion: systemName+" "+version);
}

runApp(
Expand Down Expand Up @@ -95,6 +96,7 @@ class BalanceApp extends StatelessWidget {
Routes.info: (_) => UserInfoRecapScreen(),
Routes.slider: (_) => SliderScreen(),
Routes.credits: (_) => CreditsScreen(),
Routes.issues: (_) => IssuesScreen(),
Routes.result: (_) => ResultScreen(),
Routes.open_source: (_) => OpenSourceScreen(),
},
Expand Down
22 changes: 22 additions & 0 deletions lib/manager/preference_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class PreferenceManager {
static const _showTutorial = "ShowTutorial";
// Calibration
static const _isDeviceCalibrated = "IsDeviceCalibrated";
// Initial Condition
static const _initialCondition = "initialCondition";
// Accelerometer
static const _accelerometerBiasX = "AccelerometerBiasX";
static const _accelerometerBiasY = "AccelerometerBiasY";
Expand Down Expand Up @@ -74,6 +76,16 @@ class PreferenceManager {
return pref.getBool(_isDeviceCalibrated) ?? false;
}

/// Update the all sensors biases with fresh values
///
/// Given an accelerometer [SensorBias] and a gyroscope
/// [SensorBias] update their values into the [SharedPreferences]
/// and set [_isDeviceCalibrated] to true.
static Future<void> updateInitialCondition(int condition) async {
var pref = await SharedPreferences.getInstance();
pref.setInt(_initialCondition, condition);
}

/// Update the all sensors biases with fresh values
///
/// Given an accelerometer [SensorBias] and a gyroscope
Expand Down Expand Up @@ -109,6 +121,16 @@ class PreferenceManager {
pref.setString(_osVersion, osVersion);
}

/// Return a [Future] with accelerometer [SensorBias]
///
/// This method will return the accelerometer
/// [SensorBias] stored in [SharedPreferences];
/// if the values are null [0.0] will be passed instead.
static Future<int> get initialCondition async {
var pref = await SharedPreferences.getInstance();
return pref.getInt(_initialCondition) ?? 0;
}

/// Return a [Future] with accelerometer [SensorBias]
///
/// This method will return the accelerometer
Expand Down
Loading

0 comments on commit ccc5ca3

Please sign in to comment.