diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 30aa626..ae78c11 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -1,29 +1,113 @@ - - - - - - - - - - + + + +
+ + + + xmlns:android + + ^$ + + + +
+
+ + + + xmlns:.* + + ^$ + + + BY_NAME + +
+
+ + + + .*:id + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + .*:name + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + name + + ^$ + + + +
+
+ + + + style + + ^$ + + + +
+
+ + + + .* + + ^$ + + + BY_NAME + +
+
+ + + + .* + + http://schemas.android.com/apk/res/android + + + ANDROID_ATTRIBUTE_ORDER + +
+
+ + + + .* + + .* + + + BY_NAME + +
+
+
+
\ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index d02109f..be69a48 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,8 +2,11 @@ - + + + + diff --git a/app/build.gradle b/app/build.gradle index ee4784e..c6af63b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -25,12 +25,12 @@ android { applicationId "science.apolline" minSdkVersion 21 targetSdkVersion 27 - + versionCode 26 versionName "2.4.9" - manifestPlaceholders = [fabric_api_key:"apiKey", - google_map_api_key:"apiKey"] + manifestPlaceholders = [fabric_api_key : "apiKey", + google_map_api_key: "apiKey"] testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" javaCompileOptions { @@ -166,6 +166,7 @@ project.ext { circle_menu_version = '2.0.0' rxbluetooth_version = '2.0.1' kpermissions_version = '1.0.0' + zxing_version = '3.6.0' } @@ -175,6 +176,7 @@ dependencies { implementation "com.google.firebase:firebase-core:$firebase_core_version" implementation "com.android.support:support-v4:$appcompat_version" implementation "com.android.support:recyclerview-v7:$appcompat_version" + implementation 'com.android.support.constraint:constraint-layout:1.1.3' testImplementation "junit:junit:$junit_version" androidTestImplementation "com.android.support.test:runner:$runner_version" androidTestImplementation "com.android.support.test.espresso:espresso-core:$espresso_core_version" @@ -184,6 +186,7 @@ dependencies { implementation "com.android.support:design:$appcompat_version" implementation "com.android.support.constraint:constraint-layout:$constraint_layout_version" implementation "com.android.support:support-v4:$appcompat_version" + implementation "com.android.support:recyclerview-v7:27.0.0" // Retrofit implementation "com.squareup.retrofit2:retrofit:$retrofit_version" @@ -299,6 +302,7 @@ dependencies { implementation 'com.squareup:android-times-square:1.6.5@aar' testCompile "org.testcontainers:testcontainers:1.12.3" + implementation "com.journeyapps:zxing-android-embedded:$zxing_version" } repositories { diff --git a/app/schemas/science.apolline.service.database.AppDatabase/3.json b/app/schemas/science.apolline.service.database.AppDatabase/3.json new file mode 100644 index 0000000..d1c19a0 --- /dev/null +++ b/app/schemas/science.apolline.service.database.AppDatabase/3.json @@ -0,0 +1,107 @@ +{ + "formatVersion": 1, + "database": { + "version": 3, + "identityHash": "a1f865033f393fd8fc7cc6fbdc1d95e8", + "entities": [ + { + "tableName": "Device", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `uuid` TEXT NOT NULL, `device` TEXT NOT NULL, `date` INTEGER NOT NULL, `data` TEXT, `isSync` INTEGER NOT NULL, `provider` TEXT, `geohash` TEXT, `transport` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "uuid", + "columnName": "uuid", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "device", + "columnName": "device", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "date", + "columnName": "date", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "data", + "columnName": "data", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isSync", + "columnName": "isSync", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "position.provider", + "columnName": "provider", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "position.geohash", + "columnName": "geohash", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "position.transport", + "columnName": "transport", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "timestampSync", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `date` INTEGER NOT NULL)", + "fields": [ + { + "fieldPath": "id", + "columnName": "id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "date", + "columnName": "date", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "columnNames": [ + "id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + } + ], + "setupQueries": [ + "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"a1f865033f393fd8fc7cc6fbdc1d95e8\")" + ] + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5756421..3a6458b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -25,12 +25,15 @@ + + @@ -48,21 +51,17 @@ android:name=".view.activity.MainActivity" android:hardwareAccelerated="true" android:label="@string/app_name" - android:theme="@style/AppTheme.NoActionBar"> - + android:theme="@style/AppTheme.NoActionBar"> - + android:value="" /> - + android:value="" /> - + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_qr_code.xml b/app/src/main/res/layout/activity_qr_code.xml new file mode 100644 index 0000000..e4c8f43 --- /dev/null +++ b/app/src/main/res/layout/activity_qr_code.xml @@ -0,0 +1,64 @@ + + + + +