diff --git a/.gitignore b/.gitignore index fa886c6..c445869 100644 --- a/.gitignore +++ b/.gitignore @@ -1,32 +1,16 @@ -# ---> Android -# Gradle files -.gradle/ -build/ - -# Local configuration file (sdk path, etc) -local.properties - -# Log/OS Files -*.log - -# Android Studio generated files and folders -captures/ -.externalNativeBuild/ -.cxx/ -*.apk -output.json - -# IntelliJ *.iml -.idea/ - -# Keystore files -*.jks -*.keystore - -# Google Services (e.g. APIs or Firebase) -google-services.json - -# Android Profiling -*.hprof - +.gradle +.idea +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +/app/debug \ No newline at end of file diff --git a/README.md b/README.md index a3e1eaf..39af52c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,29 @@ -# mobile_tele2med_2024 +# README # -+ mechanic \ No newline at end of file +This README would normally document whatever steps are necessary to get your application up and running. + +### What is this repository for? ### + +* Quick summary +* Version +* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo) + +### How do I get set up? ### + +* Summary of set up +* Configuration +* Dependencies +* Database configuration +* How to run tests +* Deployment instructions + +### Contribution guidelines ### + +* Writing tests +* Code review +* Other guidelines + +### Who do I talk to? ### + +* Repo owner or admin +* Other community or team contact \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..76223ea --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,316 @@ +apply plugin: 'com.android.application' + +apply plugin: 'com.google.gms.google-services' + +apply plugin: 'com.google.firebase.appdistribution' + +//apply plugin: 'io.fabric' + +apply plugin: 'kotlin-android' + +apply plugin: 'kotlin-android-extensions' + +apply plugin: 'kotlin-kapt' + +buildscript { + repositories { + google() + } + dependencies { + classpath 'com.google.firebase:firebase-appdistribution-gradle:1.3.1' + } +} + +android { + + signingConfigs { + config { + storeFile file('F:\\24marchD\\android\\dev mobile_tele2med\\keystore_tele2med.jks') + storePassword '!QAZ2wsx' + keyAlias = 'Tele2Med' + keyPassword '!QAZ2wsx' + } + } + compileSdkVersion 33 + buildToolsVersion "29.0.3" + + defaultConfig { + applicationId "ru.tele2med.mobile" + minSdkVersion 26 + targetSdkVersion 33 + + def appVersionMajor = "1.0" + def buildNumber = 16 + def splash_version = "3.0" + def fullVersion = splash_version + + versionCode buildNumber + buildConfigField "String", "UNIQ_ID", '"06b2ddef-081d-5258-1eec-be3bea2fc944"' + buildConfigField "String", "ORG_INN", '"7709001494"' + // buildConfigField "String", "ORGANIZAT", '"ООО \"03 Мед\" ОФИС"' + + versionName fullVersion + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + buildConfigField "String", "API_BASE_URL", '"https://pvdp.tis-online.com/Montrans/api"' + buildConfigField "String", "API_VERSION", '"v1"' + // buildConfigField "String", "TOKEN_APP", '"28170DFB805E49149FF3CE21E97EA8F4"' + buildConfigField "String", "TOKEN_APP", '"1C42561FD40C43C9A01C4523B8A34F8A"' + multiDexEnabled true + } + + buildTypes { + debug { + minifyEnabled false + debuggable true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' + firebaseAppDistribution { + serviceCredentialsFile = "/home/test/.jenkins/keys/tis-online-9314c-29fc6562a3e9.json" + releaseNotes = "Debug version" + // testers = "ksenia.pridachina@itbrick.ru,nail.dulkarnaev@itbrick.ru" + } + } + release { + minifyEnabled false + debuggable false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' + firebaseAppDistribution { + serviceCredentialsFile = "/home/test/.jenkins/keys/tis-online-9314c-29fc6562a3e9.json" + releaseNotes = "Release version" + // testers = "ksenia.pridachina@itbrick.ru,nail.dulkarnaev@itbrick.ru,chulpan@itbrick.ru" + } + signingConfig signingConfigs.config + } + } + + compileOptions { + sourceCompatibility = '1.8' + targetCompatibility = '1.8' + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8 + } + applicationVariants.all { variant -> + variant.outputs.all { output -> + def project = "tele2med" + def SEP = "_" + def buildType = variant.buildType.name // variant.variantData.variantConfiguration.buildType.name + def version = variant.versionName + def date = new Date() + def format = variant + def formattedDate = date.format('ddMMyy_HHmm') + def splash_version = "3.0" + def splash_date = "010923_1000" + // def newApkName = project + SEP + buildType + SEP + version + SEP + formattedDate + "_" + ".apk" + def newApkName = project + SEP + buildType + SEP + splash_version + SEP + splash_date + "_" + ".apk" + outputFileName = new File(newApkName) + } + } + + flavorDimensions "version" + productFlavors { + prod { + dimension "version" + buildConfigField "String", "API_BASE_URL", '"https://med.tele2med.ru/api/"' + buildConfigField "String", "API_ARM_URL", '"https://med.tele2med.ru/arm/"' + buildConfigField "String", "API_QR_URL", '"https://qr.g03.ru/"' + buildConfigField "String", "API_RESULT_URL", '"https://qr.g03.ru/qr/"' + buildConfigField "String", "API_VERSION", '"v1"' + buildConfigField "String", "TOKEN_APP", '"D050DBA2A44A47D2A6058E5275D84541"' + buildConfigField "String", "DEMO_UNIQ_ID", '"b160146c-dbf6-4b9f-bc01-31cdf11988ed"' + buildConfigField "String", "WSS_URL", '"med.tele2med.ru"' + + } + dev { + dimension "version" + buildConfigField "String", "API_BASE_URL", '"https://devweb.tele2med.ru/api2/"' + buildConfigField "String", "API_ARM_URL", '"https://devweb.tele2med.ru/arm/"' + buildConfigField "String", "API_QR_URL", '"https://devqr.g03.ru/"' + buildConfigField "String", "API_RESULT_URL", '"https://dev.t2m.su/qr/"' + buildConfigField "String", "API_VERSION", '"v1"' + buildConfigField "String", "TOKEN_APP", '"D050DBA2A44A47D2A6058E5275D84541"' + buildConfigField "String", "DEMO_UNIQ_ID", '"b160146c-dbf6-4b9f-bc01-31cdf11988ed"' + buildConfigField "String", "WSS_URL", '"devweb.tele2med.ru"' + } + jooli { + dimension "version" + buildConfigField "String", "API_BASE_URL", '"https://jooli.tele2med.ru/api/"' + buildConfigField "String", "API_ARM_URL", '"https://jooli.tele2med.ru/arm/"' + buildConfigField "String", "API_QR_URL", '"https://qr.g03.ru/"' + buildConfigField "String", "API_RESULT_URL", '"https://qr.g03.ru/qr/"' + buildConfigField "String", "API_VERSION", '"v1"' + buildConfigField "String", "TOKEN_APP", '"D050DBA2A44A47D2A6058E5275D84541"' + buildConfigField "String", "DEMO_UNIQ_ID", '"028477b3-329e-c4ba-763c-357966f641ae"' + + } + + } + +} + + +////////////Version utils/////////////////// +def getVersionNumber() { + def versionCode = "" + new ByteArrayOutputStream().withStream { os -> + exec { + executable = 'git' + args = ['rev-list', '--count', '--all', 'HEAD'] + standardOutput = os + } + versionCode = os.toString() + } + return versionCode +} + +/////////////////////// + +repositories { + maven { + url "http://maven.google.com/" + } +} + +dependencies { + implementation 'com.jjoe64:graphview:4.2.2' + implementation 'com.github.mazenrashed:Printooth:1.3.1' //printer + implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" + implementation 'com.github.DantSu:ESCPOS-ThermalPrinter-Android:3.3.0' + + implementation 'org.java-websocket:Java-WebSocket:1.4.0' + + + implementation 'com.tom_roush:pdfbox-android:1.8.10.1' + + implementation 'com.github.bumptech.glide:glide:4.12.0' + annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0' + + + // Barcode scanning API + implementation 'com.budiyev.android:code-scanner:2.1.0' + + + // implementation 'com.google.mlkit:barcode-scanning:17.0.0' + implementation 'com.google.android.gms:play-services-mlkit-barcode-scanning:16.2.1' + + // CameraX library + def camerax_version = "1.0.1" + implementation "androidx.camera:camera-camera2:$camerax_version" + implementation "androidx.camera:camera-lifecycle:$camerax_version" + implementation "androidx.camera:camera-view:1.0.0-alpha28" + + + implementation 'org.apache.commons:commons-io:1.3.2' + implementation "androidx.browser:browser:1.4.0" + + + implementation 'com.wesleyelliott:camera2-video:0.0.2' + + implementation project(':library') + + implementation 'com.github.dbof10:Bitmp4:0.1.1' + implementation 'androidx.camera:camera-core:1.0.2' + annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0' + annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0' + implementation("com.github.bumptech.glide:glide:4.12.0@aar") { + transitive = true + } + + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.4" + + implementation 'com.google.maps.android:android-maps-utils:0.4+' + implementation 'com.google.firebase:firebase-messaging:21.0.1' + + implementation 'joda-time:joda-time:2.9.4' + + + implementation "androidx.preference:preference-ktx:1.1.0" + + implementation 'org.osmdroid:osmdroid-android:6.1.6' + implementation 'com.github.MKergall:osmbonuspack:6.6.0' + + implementation 'io.nlopez.smartlocation:library:3.3.3' + + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + // Android + implementation "androidx.multidex:multidex:$multidex_version" + implementation "androidx.appcompat:appcompat:$appcompat_version" + implementation "androidx.core:core-ktx:$ktx_version" + implementation "androidx.constraintlayout:constraintlayout:$constraint_version" + + // Google + implementation "com.google.android.material:material:$material_version" + // implementation "com.crashlytics.sdk.android:crashlytics:$crashlytics_version" + implementation "com.google.android.gms:play-services-location:$play_services_location_version" + + // Di + implementation "org.kodein.di:kodein-di-generic-jvm:$kodein_version" + implementation "org.kodein.di:kodein-di-framework-android-x:$kodein_version" + + // Db + // Room + implementation "androidx.room:room-runtime:$room_version" + kapt "androidx.room:room-compiler:$room_version" + implementation "androidx.room:room-rxjava2:$room_version" + + // Architecture + // Moxy + kapt "tech.schoolhelper:moxy-x-compiler:$moxy_version" + implementation "tech.schoolhelper:moxy-x:$moxy_version" + implementation "tech.schoolhelper:moxy-x-androidx:$moxy_version" + + // Rx + implementation "io.reactivex.rxjava2:rxkotlin:$rx_kotlin_version" + implementation "io.reactivex.rxjava2:rxandroid:$rx_android_version" + implementation "io.reactivex.rxjava2:rxjava:$rx_java_version" + implementation "com.jakewharton.rxrelay2:rxrelay:$rx_relay_version" + + // Network + // OkHttp + implementation "com.squareup.okhttp3:okhttp:$okhttp_version" + implementation "com.squareup.okhttp3:logging-interceptor:$okhttp_version" + // Retrofit + implementation "com.squareup.retrofit2:retrofit:$retrofit_version" + implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit_version" + implementation "com.squareup.retrofit2:converter-gson:$retrofit_version" + // Picasso + implementation "com.squareup.picasso:picasso:$picasso_version" + implementation "jp.wasabeef:picasso-transformations:$picasso_transf_version" + + // Navigation + // Cicerone + implementation "ru.terrakok.cicerone:cicerone:$cicerone_version" + + // Ui + implementation "com.github.santalu:mask-edittext:$santalu_mask_et_version" + implementation "com.poovam:pin-edittext-field:$poovam_pin_et_version" + implementation "net.cachapa.expandablelayout:expandablelayout:$cachapa_explayout_version" + + // Anko + implementation "org.jetbrains.anko:anko-commons:$anko_version" + + // Debug + // Logging + implementation "com.jakewharton.timber:timber:$timber_version" + // Debug Drawer + debugImplementation "io.palaima.debugdrawer:debugdrawer:$debugdrawer_version" + implementation "io.palaima.debugdrawer:debugdrawer-base:$debugdrawer_version" + implementation "io.palaima.debugdrawer:debugdrawer-timber:$debugdrawer_version" + implementation "io.palaima.debugdrawer:debugdrawer-okhttp3:$debugdrawer_version" + implementation "io.palaima.debugdrawer:debugdrawer-logs:$debugdrawer_version" + debugImplementation "com.readystatesoftware.chuck:library:$chuck_version" + implementation "com.github.pedrovgs:lynx:$lynx_version" + + // Tests + testImplementation "io.mockk:mockk:$mockk_version" + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" + androidTestImplementation "androidx.test.ext:junit:$junit_ext_version" + androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version" + implementation 'com.google.android.gms:play-services-maps:17.0.0' + +} + diff --git a/app/google-services.json b/app/google-services.json new file mode 100644 index 0000000..c5e14cc --- /dev/null +++ b/app/google-services.json @@ -0,0 +1,98 @@ +{ + "project_info": { + "project_number": "162196473888", + "firebase_url": "https://tis-online-9314c.firebaseio.com", + "project_id": "tis-online-9314c", + "storage_bucket": "tis-online-9314c.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:162196473888:android:ba797587f3160192185445", + "android_client_info": { + "package_name": "ru.tele2med.mobile" + } + }, + "oauth_client": [ + { + "client_id": "162196473888-heoug9atjihs7vp8ii8du9qq0323l5me.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyClciynYDdN3mmd9FWWC9xk3-u-toMqJ2Q" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "162196473888-heoug9atjihs7vp8ii8du9qq0323l5me.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:162196473888:android:fd81480a21fe4096185445", + "android_client_info": { + "package_name": "com.tisonline.tis_taxi" + } + }, + "oauth_client": [ + { + "client_id": "162196473888-heoug9atjihs7vp8ii8du9qq0323l5me.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyClciynYDdN3mmd9FWWC9xk3-u-toMqJ2Q" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "162196473888-heoug9atjihs7vp8ii8du9qq0323l5me.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:162196473888:android:741df14cea37a057185445", + "android_client_info": { + "package_name": "com.tisonline.tis_user" + } + }, + "oauth_client": [ + { + "client_id": "162196473888-heoug9atjihs7vp8ii8du9qq0323l5me.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyClciynYDdN3mmd9FWWC9xk3-u-toMqJ2Q" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "162196473888-heoug9atjihs7vp8ii8du9qq0323l5me.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..6e7ffa9 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/app/src/dev/res/drawable-v24/ic_launcher_foreground.xml b/app/src/dev/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..eabde77 --- /dev/null +++ b/app/src/dev/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + diff --git a/app/src/dev/res/drawable/arrow.png b/app/src/dev/res/drawable/arrow.png new file mode 100644 index 0000000..33dba8b Binary files /dev/null and b/app/src/dev/res/drawable/arrow.png differ diff --git a/app/src/dev/res/drawable/ic_launcher_foreground.xml b/app/src/dev/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..18bb1d5 --- /dev/null +++ b/app/src/dev/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + diff --git a/app/src/dev/res/drawable/ic_logo.xml b/app/src/dev/res/drawable/ic_logo.xml new file mode 100644 index 0000000..a5b8c9b --- /dev/null +++ b/app/src/dev/res/drawable/ic_logo.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + diff --git a/app/src/dev/res/drawable/people.png b/app/src/dev/res/drawable/people.png new file mode 100644 index 0000000..ec111ed Binary files /dev/null and b/app/src/dev/res/drawable/people.png differ diff --git a/app/src/dev/res/drawable/tonometr.png b/app/src/dev/res/drawable/tonometr.png new file mode 100644 index 0000000..b1771c0 Binary files /dev/null and b/app/src/dev/res/drawable/tonometr.png differ diff --git a/app/src/dev/res/drawable/tonometr_.png b/app/src/dev/res/drawable/tonometr_.png new file mode 100644 index 0000000..f4fc922 Binary files /dev/null and b/app/src/dev/res/drawable/tonometr_.png differ diff --git a/app/src/dev/res/drawable/tonometr_med.png b/app/src/dev/res/drawable/tonometr_med.png new file mode 100644 index 0000000..dfa31c3 Binary files /dev/null and b/app/src/dev/res/drawable/tonometr_med.png differ diff --git a/app/src/dev/res/drawable/unnamed.png b/app/src/dev/res/drawable/unnamed.png new file mode 100644 index 0000000..e6e0c3a Binary files /dev/null and b/app/src/dev/res/drawable/unnamed.png differ diff --git a/app/src/dev/res/font/roboto.xml b/app/src/dev/res/font/roboto.xml new file mode 100644 index 0000000..1876187 --- /dev/null +++ b/app/src/dev/res/font/roboto.xml @@ -0,0 +1,6 @@ + + diff --git a/app/src/dev/res/font/roboto_condensed_light.xml b/app/src/dev/res/font/roboto_condensed_light.xml new file mode 100644 index 0000000..b690079 --- /dev/null +++ b/app/src/dev/res/font/roboto_condensed_light.xml @@ -0,0 +1,6 @@ + + diff --git a/app/src/dev/res/font/roboto_condensed_regular.xml b/app/src/dev/res/font/roboto_condensed_regular.xml new file mode 100644 index 0000000..ff4f69d --- /dev/null +++ b/app/src/dev/res/font/roboto_condensed_regular.xml @@ -0,0 +1,6 @@ + + diff --git a/app/src/dev/res/font/roboto_light.xml b/app/src/dev/res/font/roboto_light.xml new file mode 100644 index 0000000..8221320 --- /dev/null +++ b/app/src/dev/res/font/roboto_light.xml @@ -0,0 +1,6 @@ + + diff --git a/app/src/dev/res/font/roboto_medium.xml b/app/src/dev/res/font/roboto_medium.xml new file mode 100644 index 0000000..370381b --- /dev/null +++ b/app/src/dev/res/font/roboto_medium.xml @@ -0,0 +1,6 @@ + + diff --git a/app/src/dev/res/font/roboto_regular.xml b/app/src/dev/res/font/roboto_regular.xml new file mode 100644 index 0000000..aefe624 --- /dev/null +++ b/app/src/dev/res/font/roboto_regular.xml @@ -0,0 +1,6 @@ + + diff --git a/app/src/dev/res/font/roboto_upper_regular.xml b/app/src/dev/res/font/roboto_upper_regular.xml new file mode 100644 index 0000000..aefe624 --- /dev/null +++ b/app/src/dev/res/font/roboto_upper_regular.xml @@ -0,0 +1,6 @@ + + diff --git a/app/src/dev/res/fragment_recorder.xml b/app/src/dev/res/fragment_recorder.xml new file mode 100644 index 0000000..72ad522 --- /dev/null +++ b/app/src/dev/res/fragment_recorder.xml @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +