first commit
This commit is contained in:
commit
21b08824be
14
.gitignore
vendored
Normal file
14
.gitignore
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
3
.idea/.gitignore
vendored
Normal file
3
.idea/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
12
.idea/gradle.xml
Normal file
12
.idea/gradle.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||
<option name="resolveExternalAnnotations" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
10
.idea/migrations.xml
Normal file
10
.idea/migrations.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectMigrations">
|
||||
<option name="MigrateToGradleLocalJavaHome">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
9
.idea/misc.xml
Normal file
9
.idea/misc.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
1
app/.gitignore
vendored
Normal file
1
app/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/build
|
7
app/InfoApp
Normal file
7
app/InfoApp
Normal file
|
@ -0,0 +1,7 @@
|
|||
//Things to Follow
|
||||
|
||||
1) Add Product Flavour For New App
|
||||
3) Add new json file and change corresponding in string file
|
||||
4) Make colors accordingly
|
||||
5) Check link urls from string file update new ons
|
||||
6)
|
314
app/build.gradle
Normal file
314
app/build.gradle
Normal file
|
@ -0,0 +1,314 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
apply plugin: 'kotlin-kapt'
|
||||
apply plugin: 'dagger.hilt.android.plugin'
|
||||
|
||||
|
||||
android {
|
||||
compileSdk 34
|
||||
//compileSdk 34
|
||||
defaultConfig {
|
||||
applicationId "com.consultantapp"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 34
|
||||
versionCode 18
|
||||
versionName "1.0.18"
|
||||
multiDexEnabled true
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
renderscriptTargetApi 21
|
||||
renderscriptSupportModeEnabled true
|
||||
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
viewBinding = true
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
debug {
|
||||
storeFile file("consultapp.jks")
|
||||
keyAlias "consultapp"
|
||||
keyPassword "codebrew"
|
||||
storePassword "codebrew"
|
||||
}
|
||||
release {
|
||||
storeFile file("consultapp.jks")
|
||||
keyAlias "consultapp"
|
||||
keyPassword "codebrew"
|
||||
storePassword "codebrew"
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "app"
|
||||
productFlavors {
|
||||
consult {
|
||||
dimension "app"
|
||||
applicationId "com.lovenavigatoruser"
|
||||
versionCode 1
|
||||
versionName "1.0.0"
|
||||
buildConfigField 'String', 'APP_UNIQUE_ID', "\"a59ef14422c898df221e0f4da0ed85611\""
|
||||
buildConfigField 'String', 'BASE_URL', "\"https://peercation.netsolutionindia.com/\""
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
flavorDimensions "app"
|
||||
productFlavors {
|
||||
consult {
|
||||
dimension "app"
|
||||
applicationId "com.consultantapp"
|
||||
versionCode 6
|
||||
versionName "1.0.5"
|
||||
buildConfigField 'String', 'APP_UNIQUE_ID', "\"a59ef14422c898df221e0f4da0ed85611\""
|
||||
buildConfigField 'String', 'BASE_URL', "\"https://royoconsult.com/\""
|
||||
}
|
||||
|
||||
nurseLynx {
|
||||
dimension "app"
|
||||
applicationId "com.nurseLynx.user"
|
||||
versionCode 18
|
||||
versionName "1.0.18"
|
||||
buildConfigField 'String', 'APP_UNIQUE_ID', "\"c6b484d83fb21425453dcd0af6c1f01b15\""
|
||||
// buildConfigField 'String', 'BASE_URL', "\"https://nurselynx.royoconsult.com/\""
|
||||
buildConfigField 'String', 'BASE_URL', "\"https://nurselynx.netsolutionindia.com/\""
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig signingConfigs.release
|
||||
minifyEnabled false
|
||||
debuggable false
|
||||
shrinkResources false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug {
|
||||
signingConfig signingConfigs.debug
|
||||
debuggable true
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
all { // You should exclude one of them not both of them
|
||||
exclude group: "com.android.support", module: "support-core-ui"
|
||||
exclude group: "com.android.support", module: "support-compat"
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
abortOnError false
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "11"
|
||||
}
|
||||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
bundle {
|
||||
language {
|
||||
// Specifies that the app bundle should not support
|
||||
// configuration APKs for language resources. These
|
||||
// resources are instead packaged with each base and
|
||||
// dynamic feature APK.
|
||||
enableSplit = false
|
||||
}
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
exclude 'META-INF/DEPENDENCIES'
|
||||
exclude 'META-INF/LICENSE'
|
||||
exclude 'META-INF/LICENSE.txt'
|
||||
exclude 'META-INF/license.txt'
|
||||
exclude 'META-INF/NOTICE'
|
||||
exclude 'META-INF/NOTICE.txt'
|
||||
exclude 'META-INF/notice.txt'
|
||||
exclude 'META-INF/ASL2.0'
|
||||
exclude("META-INF/*.kotlin_module")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
maven { url 'https://jitpack.io' }
|
||||
maven { url "https://jcenter.bintray.com"}
|
||||
maven { url "https://repo.spring.io/libs-release" }
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
/* kapt {
|
||||
generateStubs = true
|
||||
correctErrorTypes = true
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.0")
|
||||
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10"
|
||||
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.20"
|
||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||
implementation 'androidx.core:core-ktx:1.6.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
|
||||
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
|
||||
implementation 'com.google.android.gms:play-services-maps:17.0.1'
|
||||
implementation 'com.github.aabhasr1:OtpView:v1.1.2-ktx'
|
||||
implementation "com.github.bumptech.glide:glide:4.11.0"
|
||||
|
||||
/*LIFECYCLE COMPONENTS*/
|
||||
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0"
|
||||
|
||||
/*COUNTRY CODE PICKER*/
|
||||
implementation 'com.hbb20:ccp:2.4.7'
|
||||
|
||||
/*ANDROID SUPPORT*/
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
|
||||
/*MATERIAL COMPONENTS*/
|
||||
implementation 'com.google.android.material:material:1.4.0'
|
||||
|
||||
/*KOTLIN*/
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8'
|
||||
implementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2'
|
||||
|
||||
/*PIN VIEW*/
|
||||
//implementation "com.chaos.view:pinview:1.4.3"
|
||||
implementation 'io.github.chaosleung:pinview:1.4.4'
|
||||
|
||||
/*RETROFIT*/
|
||||
def retrofitVersion = '2.9.0'
|
||||
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
|
||||
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
|
||||
implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion"
|
||||
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
|
||||
|
||||
/*OK HTTP*/
|
||||
implementation "com.squareup.okhttp3:okhttp:4.9.0"
|
||||
implementation "com.squareup.okhttp3:logging-interceptor:4.9.0"
|
||||
|
||||
implementation "androidx.activity:activity-ktx:1.7.2"
|
||||
|
||||
/*DAGGER*/
|
||||
// implementation "com.google.dagger:dagger-android:2.37"
|
||||
// implementation "com.google.dagger:dagger-android-support:2.37"
|
||||
// kapt "com.google.dagger:dagger-android-processor:2.37"
|
||||
// kapt "com.google.dagger:dagger-compiler:2.37"
|
||||
|
||||
// Add Dagger Hilt dependencies
|
||||
implementation "com.google.dagger:hilt-android:2.48"
|
||||
kapt "com.google.dagger:hilt-compiler:2.48"
|
||||
implementation "androidx.fragment:fragment-ktx:1.5.2"
|
||||
|
||||
/*TIMBER*/
|
||||
implementation "com.jakewharton.timber:timber:4.7.1"
|
||||
|
||||
/*Firebase*/
|
||||
implementation 'com.google.firebase:firebase-messaging:22.0.0'
|
||||
implementation 'com.google.firebase:firebase-core:19.0.1'
|
||||
implementation 'com.google.firebase:firebase-analytics-ktx:19.0.1'
|
||||
implementation 'com.google.firebase:firebase-dynamic-links-ktx:20.1.1'
|
||||
|
||||
// Add the Firebase crashlytics dependency.
|
||||
implementation 'com.google.firebase:firebase-crashlytics-ktx:18.2.1'
|
||||
|
||||
/*ROUNDED IMAGE VIEW*/
|
||||
implementation 'com.makeramen:roundedimageview:2.3.0'
|
||||
|
||||
//Google sign in dependency
|
||||
implementation 'com.google.android.gms:play-services-auth:19.2.0'
|
||||
implementation 'com.google.firebase:firebase-auth:21.0.1'
|
||||
implementation 'com.google.android.gms:play-services-location:18.0.0'
|
||||
implementation 'com.google.android.libraries.places:places:2.2.0'
|
||||
implementation "androidx.exifinterface:exifinterface:1.3.6"
|
||||
|
||||
/*Image Doc Picker*/
|
||||
// implementation 'com.droidninja:filepicker:2.2.5'
|
||||
|
||||
/*GLIDE*/
|
||||
implementation 'com.github.bumptech.glide:glide:4.12.0'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
|
||||
|
||||
/*PERMISSION DISPATCHER*/
|
||||
/* implementation "com.github.hotchemi:permissionsdispatcher:4.8.0"
|
||||
kapt "com.github.hotchemi:permissionsdispatcher-processor:4.8.0"*/
|
||||
|
||||
implementation "com.github.permissions-dispatcher:permissionsdispatcher:4.8.0"
|
||||
kapt "com.github.permissions-dispatcher:permissionsdispatcher-processor:4.8.0"
|
||||
|
||||
/*Socket*/
|
||||
implementation('io.socket:socket.io-client:1.0.0') {
|
||||
exclude group: 'org.json', module: 'json'
|
||||
}
|
||||
|
||||
/*Compress image*/
|
||||
// implementation 'id.zelory:compressor:2.1.0'
|
||||
implementation 'id.zelory:compressor:3.0.1'
|
||||
|
||||
|
||||
// Jitsi Meet
|
||||
implementation('org.jitsi.react:jitsi-meet-sdk:5.1.0') { transitive = true }
|
||||
|
||||
/*PAGER INDICATOR*/
|
||||
// implementation 'me.relex:circleindicator:2.1.4'
|
||||
implementation 'me.relex:circleindicator:2.1.6'
|
||||
|
||||
/*Card Form*/
|
||||
implementation 'com.braintreepayments:card-form:5.0.0'
|
||||
|
||||
/*Animations*/
|
||||
implementation "com.airbnb.android:lottie:3.4.4"
|
||||
|
||||
/*Date Picker*/
|
||||
implementation 'com.github.florent37:singledateandtimepicker:2.2.7'
|
||||
|
||||
/*Bmi*/
|
||||
implementation 'com.github.Gruzer:simple-gauge-android:0.3.1'
|
||||
|
||||
//for AndroidX use:
|
||||
implementation 'com.github.3llomi:RecordView:3.1.3'
|
||||
|
||||
implementation 'com.google.android.gms:play-services-wallet:18.1.3'
|
||||
implementation 'io.card:android-sdk:5.5.1'
|
||||
implementation project(path: ':oppwa.mobile')
|
||||
implementation 'de.hdodenhof:circleimageview:3.1.0'
|
||||
implementation 'com.karumi:dexter:6.2.3'
|
||||
implementation 'androidx.work:work-runtime-ktx:2.7.1'
|
||||
|
||||
|
||||
//Volley
|
||||
implementation 'com.android.volley:volley:1.2.1'
|
||||
|
||||
//Country code picker
|
||||
implementation 'io.michaelrocks:libphonenumber-android:8.13.35'
|
||||
|
||||
implementation 'com.facebook.soloader:soloader:0.11.0'
|
||||
|
||||
implementation 'com.1gravity:android-contactpicker:1.4.0'
|
||||
/*stripe*/
|
||||
implementation 'com.stripe:stripe-android:20.40.0'
|
||||
|
||||
}
|
||||
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
|
||||
|
BIN
app/consultapp.jks
Normal file
BIN
app/consultapp.jks
Normal file
Binary file not shown.
114
app/google-services.json
Normal file
114
app/google-services.json
Normal file
|
@ -0,0 +1,114 @@
|
|||
{
|
||||
"project_info": {
|
||||
"project_number": "1032811457113",
|
||||
"project_id": "nurselynx-2fb1c",
|
||||
"storage_bucket": "nurselynx-2fb1c.firebasestorage.app"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:1032811457113:android:6101978baed2c4e5f7df48",
|
||||
"android_client_info": {
|
||||
"package_name": "com.nurseLynx.expert"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "1032811457113-07iuipiq574b2kptmhgs29466m4039va.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.nurseLynx.expert",
|
||||
"certificate_hash": "3361f698a0d60d6d3eac4f81ff039897e1550f00"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "1032811457113-ledsgoe1si7i3g8tnv8ttfsrnd0pufkb.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.nurseLynx.expert",
|
||||
"certificate_hash": "3fee5aff71776031cbdc81d0b12cca08afa48d8a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "1032811457113-b8nur4jtaoql7s7k8rl4cpe2qoh67r24.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyDYOYmjHI3DXYrWpmfmD4Ekg3YXVcwiZOg"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "1032811457113-8564gftp1oes9s415mva42ch6di8njkj.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
},
|
||||
{
|
||||
"client_id": "1032811457113-l5u532a9ppl05h2vl6k4hs59393i5h99.apps.googleusercontent.com",
|
||||
"client_type": 2,
|
||||
"ios_info": {
|
||||
"bundle_id": "com.nurseLynx.user"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:1032811457113:android:8985de8c8a94813df7df48",
|
||||
"android_client_info": {
|
||||
"package_name": "com.nurseLynx.user"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "1032811457113-f9gkf2vvpgoo67sgnilnii2hojte2ugf.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.nurseLynx.user",
|
||||
"certificate_hash": "5f9881411557ba40bc3bf7ec8967f0750b1d55b2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "1032811457113-u2qflc4bogl7mne10cg6ukv3nqkit4ee.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.nurseLynx.user",
|
||||
"certificate_hash": "3fee5aff71776031cbdc81d0b12cca08afa48d8a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "1032811457113-b8nur4jtaoql7s7k8rl4cpe2qoh67r24.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyDYOYmjHI3DXYrWpmfmD4Ekg3YXVcwiZOg"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "1032811457113-8564gftp1oes9s415mva42ch6di8njkj.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
},
|
||||
{
|
||||
"client_id": "1032811457113-l5u532a9ppl05h2vl6k4hs59393i5h99.apps.googleusercontent.com",
|
||||
"client_type": 2,
|
||||
"ios_info": {
|
||||
"bundle_id": "com.nurseLynx.user"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
8
app/local.properties
Normal file
8
app/local.properties
Normal file
|
@ -0,0 +1,8 @@
|
|||
## This file must *NOT* be checked into Version Control Systems,
|
||||
# as it contains information specific to your local configuration.
|
||||
#
|
||||
# Location of the SDK. This is only used by Gradle.
|
||||
# For customization when using a Version Control System, please read the
|
||||
# header note.
|
||||
#Wed Nov 20 19:13:42 IST 2024
|
||||
sdk.dir=D\:\\Android\\Sdk
|
20
app/nurseLynx/release/output-metadata.json
Normal file
20
app/nurseLynx/release/output-metadata.json
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "com.nurseLynx.user",
|
||||
"variantName": "nurseLynxRelease",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 12,
|
||||
"versionName": "1.0.11",
|
||||
"outputFile": "app-nurseLynx-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
BIN
app/private_key.pepk
Normal file
BIN
app/private_key.pepk
Normal file
Binary file not shown.
223
app/proguard-rules.pro
vendored
Normal file
223
app/proguard-rules.pro
vendored
Normal file
|
@ -0,0 +1,223 @@
|
|||
# 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
|
||||
|
||||
|
||||
|
||||
-dontwarn android.databinding.**
|
||||
-keep class android.databinding.** { *; }
|
||||
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
|
||||
|
||||
##---------------Begin: proguard configuration for Retrofit ----------
|
||||
|
||||
# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
|
||||
# EnclosingMethod is required to use InnerClasses.
|
||||
-keepattributes Signature, InnerClasses, EnclosingMethod
|
||||
|
||||
# Retrofit does reflection on method and parameter annotations.
|
||||
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
|
||||
|
||||
# Retain service method parameters when optimizing.
|
||||
-keepclassmembers,allowshrinking,allowobfuscation interface * {
|
||||
@retrofit2.http.* <methods>;
|
||||
}
|
||||
|
||||
# Ignore annotation used for build tooling.
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
|
||||
|
||||
# Ignore JSR 305 annotations for embedding nullability information.
|
||||
-dontwarn javax.annotation.**
|
||||
|
||||
# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.
|
||||
-dontwarn kotlin.Unit
|
||||
|
||||
# Top-level functions that can only be used by Kotlin.
|
||||
-dontwarn retrofit2.KotlinExtensions
|
||||
|
||||
# With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
|
||||
# and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
|
||||
-if interface * { @retrofit2.http.* <methods>; }
|
||||
-keep,allowobfuscation interface <1>
|
||||
##---------------End: proguard configuration for Retrofit ----------
|
||||
|
||||
|
||||
|
||||
|
||||
##---------------Begin: proguard configuration for Gson ----------
|
||||
# Gson uses generic type information stored in a class file when working with fields. Proguard
|
||||
# removes such information by default, so configure it to keep all of it.
|
||||
-keepattributes Signature
|
||||
|
||||
# For using GSON @Expose annotation
|
||||
-keepattributes Annotation
|
||||
|
||||
# Gson specific classes
|
||||
-dontwarn sun.misc.**
|
||||
-keep class com.google.gson.stream.** { *; }
|
||||
|
||||
# Application classes that will be serialized/deserialized over Gson
|
||||
-keep class com.coaching.data.** { *; }
|
||||
|
||||
# Prevent proguard from stripping interface information from TypeAdapterFactory,
|
||||
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
|
||||
-keep class * implements com.google.gson.TypeAdapterFactory
|
||||
-keep class * implements com.google.gson.JsonSerializer
|
||||
-keep class * implements com.google.gson.JsonDeserializer
|
||||
|
||||
##---------------End: proguard configuration for Gson ----------
|
||||
|
||||
|
||||
|
||||
# JSR 305 annotations are for embedding nullability information.
|
||||
-dontwarn javax.annotation.**
|
||||
|
||||
# A resource is loaded with a relative path so the package of this class must be preserved.
|
||||
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
|
||||
|
||||
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
||||
|
||||
# OkHttp platform used only on JVM and when Conscrypt dependency is available.
|
||||
-dontwarn okhttp3.internal.platform.ConscryptPlatform
|
||||
|
||||
|
||||
##---------------Begin: proguard configuration for Glide ----------
|
||||
-keep public class * implements com.bumptech.glide.module.GlideModule
|
||||
-keep public class * extends com.bumptech.glide.module.AppGlideModule
|
||||
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
||||
**[] $VALUES;
|
||||
public *;
|
||||
}
|
||||
|
||||
##---------------End: proguard configuration for Glide ----------
|
||||
|
||||
|
||||
##---------------Begin: proguard configuration for Jitsi ----------
|
||||
|
||||
# okhttp
|
||||
|
||||
-keepattributes Signature
|
||||
-keepattributes *Annotation*
|
||||
-keep class okhttp3.** { *; }
|
||||
-keep interface okhttp3.** { *; }
|
||||
-dontwarn okhttp3.**
|
||||
|
||||
# okio
|
||||
|
||||
-dontwarn java.nio.file.*
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
|
||||
-keep class okio.** { *; }
|
||||
-dontwarn okio.**
|
||||
|
||||
# WebRTC
|
||||
|
||||
-keep class org.webrtc.** { *; }
|
||||
-dontwarn org.chromium.build.BuildHooksAndroid
|
||||
|
||||
# Jisti Meet SDK
|
||||
|
||||
-keep class org.jitsi.meet.** { *; }
|
||||
-keep class org.jitsi.meet.sdk.** { *; }
|
||||
|
||||
# We added the following when we switched minifyEnabled on. Probably because we
|
||||
# ran the app and hit problems...
|
||||
-dontwarn com.google.appengine.**
|
||||
-dontwarn com.squareup.okhttp.**
|
||||
-dontwarn javax.servlet.**
|
||||
|
||||
# ^^^ We added the above when we switched minifyEnabled on.
|
||||
|
||||
# Rule to avoid build errors related to SVGs.
|
||||
-keep public class com.horcrux.svg.** {*;}
|
||||
|
||||
##---------------End: proguard configuration for Jitsi ----------
|
||||
|
||||
|
||||
-keepclassmembers class * {
|
||||
@android.webkit.JavascriptInterface <methods>;
|
||||
}
|
||||
|
||||
-keepattributes JavascriptInterface
|
||||
-keepattributes *Annotation*
|
||||
|
||||
-optimizations !method/inlining/*
|
||||
|
||||
-keepclasseswithmembers class * {
|
||||
public void onPayment*(...);
|
||||
}
|
||||
|
||||
##---------------Start: proguard configuration for picker ----------
|
||||
# Glide
|
||||
-keep public class * implements com.bumptech.glide.module.GlideModule
|
||||
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
|
||||
**[] $VALUES;
|
||||
public *;
|
||||
}
|
||||
# support-v7-appcompat
|
||||
-keep public class android.support.v7.widget.** { *; }
|
||||
-keep public class android.support.v7.internal.widget.** { *; }
|
||||
-keep public class android.support.v7.internal.view.menu.** { *; }
|
||||
# support-design
|
||||
-dontwarn android.support.design.**
|
||||
-keep class android.support.design.** { *; }
|
||||
-keep interface android.support.design.** { *; }
|
||||
-keep public class android.support.design.R$* { *; }
|
||||
##---------------End: proguard configuration for Picker ----------
|
||||
|
||||
##---------------Begin: proguard configuration for image picker ----------
|
||||
# Glide
|
||||
-keep public class * implements com.bumptech.glide.module.GlideModule
|
||||
-keep class * extends com.bumptech.glide.module.AppGlideModule {
|
||||
<init>(...);
|
||||
}
|
||||
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
||||
**[] $VALUES;
|
||||
public *;
|
||||
}
|
||||
-keep class com.bumptech.glide.load.data.ParcelFileDescriptorRewinder$InternalRewinder {
|
||||
*** rewind();
|
||||
}
|
||||
|
||||
# Uncomment for DexGuard only
|
||||
#-keepresourcexmlelements manifest/application/meta-data@value=GlideModule
|
||||
|
||||
##---------------End: proguard configuration for image picker ----------
|
||||
|
||||
##---------------Begin: proguard configuration for threetenabp ----------
|
||||
|
||||
# Keep class members used for serialization
|
||||
# https://www.guardsquare.com/en/products/proguard/manual/examples#serializable
|
||||
-keepclassmembers class org.threeten.bp.** implements java.io.Serializable {
|
||||
private static final java.io.ObjectStreamField[] serialPersistentFields;
|
||||
private void writeObject(java.io.ObjectOutputStream);
|
||||
private void readObject(java.io.ObjectInputStream);
|
||||
java.lang.Object writeReplace();
|
||||
java.lang.Object readResolve();
|
||||
|
||||
}
|
||||
##---------------End: proguard configuration for threetenabp ----------
|
||||
|
||||
|
245
app/src/main/AndroidManifest.xml
Normal file
245
app/src/main/AndroidManifest.xml
Normal file
|
@ -0,0 +1,245 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.consultantapp">
|
||||
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.CALL_PHONE" />
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED"/>
|
||||
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
|
||||
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL"/>
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
|
||||
<uses-permission android:name="android.permission.MANAGE_OWN_CALLS"/>
|
||||
<uses-permission android:name="com.google.android.gms.permission.AD_ID" />
|
||||
|
||||
<uses-feature android:name="android.hardware.camera" />
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" />
|
||||
<uses-feature
|
||||
android:glEsVersion="0x00020000"
|
||||
android:required="true" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.telephony"
|
||||
android:required="false" />
|
||||
|
||||
|
||||
<application
|
||||
android:name=".ConsultantUserApplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:largeHeap="true"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:replace="allowBackup,icon,theme,label,name">
|
||||
|
||||
<activity
|
||||
android:name=".ui.SplashActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<intent-filter
|
||||
android:autoVerify="true"
|
||||
tools:targetApi="m">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="@string/deep_link_url"
|
||||
android:scheme="https" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.loginSignUp.SignUpActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateVisible|adjustResize" />
|
||||
<activity
|
||||
android:name=".ui.dashboard.HomeActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.dashboard.doctor.listing.DoctorListActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.dashboard.doctor.detail.DoctorDetailActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.drawermenu.DrawerActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.dashboard.location.AddAddressActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name="com.onegravity.contactpicker.core.ContactPickerActivity"
|
||||
android:enabled="true"
|
||||
android:exported="false" >
|
||||
|
||||
<intent-filter>
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.dashboard.chat.chatdetail.ChatDetailActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.dashboard.appointment.appointmentStatus.AppointmentStatusActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
|
||||
<service
|
||||
android:name=".pushNotifications.MessagingService"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:permission="com.google.android.c2dm.permission.SEND">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
||||
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<!--android:authorities="${applicationId}.provider" -->
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="com.consultantapp"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true"
|
||||
tools:replace="android:authorities">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_provider_paths"
|
||||
tools:replace="android:resource" />
|
||||
</provider>
|
||||
|
||||
<!-- <service
|
||||
android:name=".ui.calling.IncomingCallNotificationService"
|
||||
android:foregroundServiceType="phoneCall"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="ACTION_ACCEPT" />
|
||||
<action android:name="ACTION_REJECT" />
|
||||
</intent-filter>
|
||||
</service>-->
|
||||
|
||||
<service
|
||||
android:name=".ui.calling.IncomingCallNotificationService"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:foregroundServiceType="phoneCall">
|
||||
<intent-filter>
|
||||
<action android:name="ACTION_ACCEPT" />
|
||||
<action android:name="ACTION_REJECT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<activity
|
||||
android:name=".ui.jitsimeet.JitsiActivity"
|
||||
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask"
|
||||
android:resizeableActivity="true"
|
||||
android:screenOrientation="portrait"
|
||||
android:showOnLockScreen="true"
|
||||
android:showWhenLocked="true"
|
||||
android:supportsPictureInPicture="true"
|
||||
android:windowSoftInputMode="adjustResize" />
|
||||
<activity
|
||||
android:name=".ui.calling.CallingActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleInstance"
|
||||
android:screenOrientation="portrait"
|
||||
android:showOnLockScreen="true"
|
||||
android:showWhenLocked="true" />
|
||||
<activity
|
||||
android:name=".ui.dashboard.doctor.DoctorActionActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.webview.WebViewActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait" />
|
||||
<receiver android:name=".pushNotifications.MyNotificationReceiver"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="ACTION_NOTIFICATION_DISMISSED" />
|
||||
<action android:name="ACTION_NOTIFICATION_DISMISSED_SERVICE" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<activity
|
||||
android:name=".ui.drawermenu.addmoney.AddMoneyActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait">
|
||||
<intent-filter>
|
||||
<data android:scheme="@string/checkout_ui_callback_scheme" />
|
||||
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<meta-data
|
||||
android:name="com.google.android.gms.version"
|
||||
android:value="@integer/google_play_services_version" />
|
||||
<meta-data
|
||||
android:name="com.google.android.geo.API_KEY"
|
||||
android:value="@string/google_places_api_key" />
|
||||
|
||||
<service
|
||||
android:name="org.jitsi.meet.sdk.ConnectionService"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE">
|
||||
<intent-filter>
|
||||
<action android:name="android.telecom.ConnectionService" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<receiver
|
||||
android:name=".pushNotifications.IncomingCallBroadcastReceiver"
|
||||
android:enabled="true"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="ACTION_INCOMING_CALL" />
|
||||
</intent-filter>
|
||||
|
||||
</receiver>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
BIN
app/src/main/assets/description_of_service_recommended.pdf
Normal file
BIN
app/src/main/assets/description_of_service_recommended.pdf
Normal file
Binary file not shown.
1
app/src/main/assets/line_progress.json
Normal file
1
app/src/main/assets/line_progress.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"v":"5.6.3","fr":25,"ip":0,"op":75,"w":450,"h":5,"nm":"Refresh_btle","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Livello forma 1","sr":1.5,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[-6.296,2.436,0],"to":[38.532,0,0],"ti":[-77.292,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":18,"s":[224.897,2.436,0],"to":[77.292,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":37.5,"s":[457.454,2.436,0],"to":[0,0,0],"ti":[77.292,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":55.5,"s":[224.897,2.436,0],"to":[-77.292,0,0],"ti":[38.533,0,0]},{"t":73.5,"s":[-6.3,2.436,0]}],"ix":2},"a":{"a":0,"k":[-162.512,-0.375,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":0,"s":[50,100,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":18,"s":[225,100,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":37.5,"s":[50,100,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":55.5,"s":[225,100,100]},{"t":73.5,"s":[50,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[50,5],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Tracciato rettangolo 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.21568627450980393,0.1843137254901961,0.5098039215686274,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Traccia 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.21568627450980393,0.1843137254901961,0.5098039215686274,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Riempimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-162.467,-0.311],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Trasformazione"}],"nm":"Rettangolo 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":75,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Livello forma 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[377.17,2.376,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[450,5],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Tracciato rettangolo 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.21568627450980393,0.1843137254901961,0.5098039215686274,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Traccia 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.8156862745098039,0.9019607843137255,1,1],"ix":4},"o":{"a":0,"k":8,"ix":5},"r":1,"bm":0,"nm":"Riempimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-152.17,0.124],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Trasformazione"}],"nm":"Rettangolo 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":75,"st":0,"bm":0}],"markers":[]}
|
1
app/src/main/assets/network_error.json
Normal file
1
app/src/main/assets/network_error.json
Normal file
File diff suppressed because one or more lines are too long
1
app/src/main/assets/pregnant_women.json
Normal file
1
app/src/main/assets/pregnant_women.json
Normal file
File diff suppressed because one or more lines are too long
1
app/src/main/assets/protein.json
Normal file
1
app/src/main/assets/protein.json
Normal file
File diff suppressed because one or more lines are too long
1
app/src/main/assets/success_light.json
Normal file
1
app/src/main/assets/success_light.json
Normal file
File diff suppressed because one or more lines are too long
1
app/src/main/assets/uploading.json
Normal file
1
app/src/main/assets/uploading.json
Normal file
File diff suppressed because one or more lines are too long
1
app/src/main/assets/wallet_light.json
Normal file
1
app/src/main/assets/wallet_light.json
Normal file
File diff suppressed because one or more lines are too long
1
app/src/main/assets/water_loader.json
Normal file
1
app/src/main/assets/water_loader.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"v":"5.5.2","fr":60,"ip":0,"op":75,"w":147,"h":194,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"np_glass_80834_000000","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[73.447,96.9,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"rc","d":1,"s":{"a":0,"k":[146.895,193.8],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false}],"ip":0,"op":3600,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Path 945","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[0,0,0],"ix":2},"a":{"a":0,"k":[73.447,96.9,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[118.783,193.8],[28.114,193.8],[0,0],[146.895,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[32.983,188.184],[113.923,188.184],[140.413,5.616],[6.494,5.616]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.180392156863,0.560784313725,0.980392156863,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path 945","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":3600,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Path 944","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":0,"s":[1.205,84.746,0],"to":[0,0,0],"ti":[0,0,0]},{"t":71,"s":[0.205,9.746,0]}],"ix":2},"a":{"a":0,"k":[58.815,75.549,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":0,"s":[70,0,100]},{"t":71,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":12,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[29.855,-32.137],[0,0]],"o":[[0,0],[0,0],[0,0],[-18.504,4.289],[-36.916,52.915],[0,0]],"v":[[0,5.115],[8.984,156.029],[105.125,156.029],[117.63,0],[59.454,21.334],[0.001,5.116]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":26,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[51.178,24.368],[0,0]],"o":[[0,0],[0,0],[0,0],[-18.504,4.289],[-44.209,-31.954],[0,0]],"v":[[0.154,5.115],[13.554,151.919],[101.291,151.919],[117.785,0],[59.609,21.334],[0.155,5.116]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"t":41,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[40.633,10.772],[0,0]],"o":[[0,0],[0,0],[0,0],[-15.825,11.758],[-44.395,-12.173],[0,0]],"v":[[0.154,5.115],[18.578,151.097],[97.257,151.097],[117.785,0],[59.609,21.334],[0.155,5.116]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0.167},"t":49,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[41.709,2.712],[0,0]],"o":[[0,0],[0,0],[0,0],[-18.842,9.643],[-43.738,-4.701],[0,0]],"v":[[0.154,5.115],[20.845,151.077],[96.238,151.097],[117.785,0],[59.609,21.334],[0.155,5.116]],"c":true}]},{"t":63,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[44.213,-16.049],[0,0]],"o":[[0,0],[0,0],[0,0],[-25.865,4.721],[-42.208,12.69],[0,0]],"v":[[0.154,5.115],[23.665,151.097],[93.866,151.097],[117.785,0],[59.609,21.334],[0.155,5.116]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.180392156863,0.560784313725,0.980392156863,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path 944","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":3600,"st":0,"bm":0}],"markers":[]}
|
BIN
app/src/main/ic_launcher-playstore.png
Normal file
BIN
app/src/main/ic_launcher-playstore.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 105 KiB |
147
app/src/main/java/com/consultantapp/ConsultantUserApplication.kt
Normal file
147
app/src/main/java/com/consultantapp/ConsultantUserApplication.kt
Normal file
|
@ -0,0 +1,147 @@
|
|||
package com.consultantapp
|
||||
|
||||
import android.app.Application
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.*
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||
import com.consultantapp.data.models.requests.AppFeatures
|
||||
import com.consultantapp.data.models.responses.appdetails.AppVersion
|
||||
import com.consultantapp.data.network.PushType
|
||||
import com.consultantapp.data.repos.UserRepository
|
||||
import com.consultantapp.ui.calling.SoundPoolManager
|
||||
import com.consultantapp.ui.dashboard.chat.chatdetail.ChatDetailActivity
|
||||
import com.consultantapp.utils.*
|
||||
import com.google.android.libraries.places.api.Places
|
||||
import com.stripe.android.PaymentConfiguration
|
||||
import dagger.hilt.android.HiltAndroidApp
|
||||
import java.util.*
|
||||
import javax.inject.Inject
|
||||
import kotlin.concurrent.schedule
|
||||
var appFeatures = AppFeatures()
|
||||
var appClientDetails = AppVersion()
|
||||
|
||||
@HiltAndroidApp
|
||||
class ConsultantUserApplication : Application(), LifecycleObserver {
|
||||
@Inject
|
||||
lateinit var userRepository: UserRepository
|
||||
|
||||
@Inject
|
||||
lateinit var prefsManager: PrefsManager
|
||||
|
||||
@Inject
|
||||
lateinit var appSocket: AppSocket
|
||||
|
||||
private var isReceiverRegistered = false
|
||||
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
||||
ProcessLifecycleOwner.get().lifecycle.addObserver(this)
|
||||
PaymentConfiguration.init(applicationContext, "pk_live_51I9GeZByc8g9SaHmkCf1foUVnmx7VhV2ElloGOVNpSDQdjKzJLkO83iUeFWTxpl4PHCC42gopN8jLU5kkRflInaJ00jCXKXg8O")
|
||||
SoundPoolManager.getInstance(this)
|
||||
appSocket.init()
|
||||
|
||||
// Initialize Places.
|
||||
try {
|
||||
Places.initialize(applicationContext, getString(R.string.google_places_api_key))
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
|
||||
setsApplication(this)
|
||||
|
||||
appClientDetails = userRepository.getAppSetting()
|
||||
|
||||
/*Check for features*/
|
||||
when (BuildConfig.FLAVOR) {
|
||||
"consult" -> {
|
||||
appFeatures.needWalkThrough = true
|
||||
appFeatures.needLanguageScreen = true
|
||||
appFeatures.needUserDoctorScreen = true
|
||||
appFeatures.needLocation = true
|
||||
appFeatures.needBlogs = true
|
||||
appFeatures.needArticles = true
|
||||
appFeatures.needHealthTools = false
|
||||
appFeatures.homeConsultIcons = true
|
||||
}
|
||||
"nurseLynx" -> {
|
||||
appFeatures.needLocation = true
|
||||
appFeatures.needInviteCode = true
|
||||
}
|
||||
else -> {
|
||||
appFeatures.needBlogs = true
|
||||
appFeatures.needArticles = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*override fun applicationInjector(): AndroidInjector<out DaggerApplication> =
|
||||
DaggerAppComponent.builder().create(this)*/
|
||||
|
||||
companion object {
|
||||
|
||||
private var isApplication: Application? = null
|
||||
|
||||
fun setsApplication(sApplication: Application) {
|
||||
isApplication = sApplication
|
||||
}
|
||||
}
|
||||
|
||||
@OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
|
||||
fun appInResumeState() {
|
||||
registerReceiver()
|
||||
//Toast.makeText(this, "In Foreground", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
@OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
|
||||
fun appInPauseState() {
|
||||
//Toast.makeText(this, "In Background", Toast.LENGTH_LONG).show();
|
||||
unregisterReceiver()
|
||||
}
|
||||
|
||||
|
||||
private fun registerReceiver() {
|
||||
if (!isReceiverRegistered) {
|
||||
val intentFilter = IntentFilter()
|
||||
intentFilter.addAction(PushType.CHAT_STARTED)
|
||||
LocalBroadcastManager.getInstance(this).registerReceiver(refreshRequests, intentFilter)
|
||||
isReceiverRegistered = true
|
||||
}
|
||||
}
|
||||
|
||||
private fun unregisterReceiver() {
|
||||
if (isReceiverRegistered) {
|
||||
LocalBroadcastManager.getInstance(this).unregisterReceiver(refreshRequests)
|
||||
isReceiverRegistered = false
|
||||
}
|
||||
}
|
||||
|
||||
private val refreshRequests = object : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
when (intent.action) {
|
||||
PushType.CHAT_STARTED -> {
|
||||
if (ChatDetailActivity.otherUserID == "-1") {
|
||||
if (!appSocket.isConnected)
|
||||
appSocket.init()
|
||||
|
||||
val intentActivity =
|
||||
Intent(this@ConsultantUserApplication, ChatDetailActivity::class.java)
|
||||
.putExtra(USER_ID, intent.getStringExtra(USER_ID))
|
||||
.putExtra(USER_NAME, intent.getStringExtra(USER_NAME))
|
||||
.putExtra(EXTRA_REQUEST_ID, intent.getStringExtra(EXTRA_REQUEST_ID))
|
||||
.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
|
||||
Timer().schedule(2000) {
|
||||
startActivity(intentActivity)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
457
app/src/main/java/com/consultantapp/data/apis/WebService.kt
Normal file
457
app/src/main/java/com/consultantapp/data/apis/WebService.kt
Normal file
|
@ -0,0 +1,457 @@
|
|||
package com.consultantapp.data.apis
|
||||
|
||||
import com.consultantapp.data.models.requests.CreateRequest
|
||||
import com.consultantapp.data.models.requests.UpdateSymptom
|
||||
import com.consultantapp.data.models.responses.*
|
||||
import com.consultantapp.data.models.responses.appdetails.AppVersion
|
||||
import com.consultantapp.data.models.responses.directions.Direction
|
||||
import com.consultantapp.data.network.responseUtil.ApiResponse
|
||||
import okhttp3.RequestBody
|
||||
import retrofit2.Call
|
||||
import retrofit2.http.*
|
||||
|
||||
|
||||
interface WebService {
|
||||
companion object {
|
||||
|
||||
private const val LOGIN = "/api/login"
|
||||
private const val APP_VERSION = "/api/appversion"
|
||||
private const val CLIENT_DETAILS = "/api/clientdetail"
|
||||
private const val COUNTRY_DATA = "/api/countrydata"
|
||||
private const val PREFERENCES = "/api/master/preferences"
|
||||
private const val UPDATE_NUMBER = "/api/update-phone"
|
||||
private const val VERIFY_OTP = "/api/verify-otp"
|
||||
private const val RESEND_OTP = "api/resend-otp"
|
||||
private const val REGISTER = "/api/register"
|
||||
private const val FORGOT_PASSWORD = "/api/forgot_password"
|
||||
private const val CHANGE_PASSWORD = "/api/password-change"
|
||||
private const val PROFILE_UPDATE = "/api/profile-update"
|
||||
private const val LOGOUT = "/api/app_logout"
|
||||
private const val SEND_SMS = "/api/send-sms"
|
||||
private const val SEND_EMAIL_OTP = "/api/send-email-otp"
|
||||
private const val EMAIL_VERIFY = "/api/email-verify"
|
||||
private const val UPDATE_FCM_ID = "/api/update-fcm-id"
|
||||
private const val CREATE_REQUEST = "/api/create-request"
|
||||
private const val CONFIRM_REQUEST = "/api/confirm-request"
|
||||
private const val ADD_CARD = "api/add-card"
|
||||
private const val GET_CLIENT_SECRET = "api/get-client-secret"
|
||||
private const val UPDATE_CARD = "/api/update-card"
|
||||
private const val DELETE_CARD = "/api/delete-card"
|
||||
private const val ADD_MONEY = "/api/add-money"
|
||||
private const val ADD_REVIEW = "/api/add-review"
|
||||
private const val REQUEST_USER_APPROVE = "/api/request-user-approve"
|
||||
private const val COMPLETE_CHAT = "/api/complete-chat"
|
||||
private const val UPLOAD_IMAGE = "/api/upload-image"
|
||||
private const val FEEDS = "/api/feeds"
|
||||
private const val FEEDS_COMMENTS = "/api/feeds/comments/{feed_id}"
|
||||
private const val VIEW_FEEDS = "/api/feeds/view/{feed_id}"
|
||||
private const val ADD_FAVORITE = "/api/feeds/add-favorite/{feed_id}"
|
||||
private const val ADD_LIKE = "/api/feeds/add-like/{feed_id}"
|
||||
private const val ADD_COMMENT = "/api/feeds/add-comment/{feed_id}"
|
||||
|
||||
private const val REQUESTS = "/api/requests-cs"
|
||||
private const val REQUEST_DETAIL = "/api/request-detail"
|
||||
private const val HOME = "/api/home"
|
||||
private const val CANCEL_REQUEST = "/api/cancel-request"
|
||||
private const val DOCTOR_LIST = "/api/doctor-list"
|
||||
private const val BANNERS = "/api/banners"
|
||||
private const val COUPONS = "/api/coupons"
|
||||
private const val DOCTOR_DETAIL = "/api/doctor-detail"
|
||||
private const val REVIEW_LIST = "/api/review-list"
|
||||
private const val WALLET_HISTORY = "/api/wallet-history"
|
||||
private const val CARD_LISTING = "/api/cards"
|
||||
private const val WALLET = "/api/wallet"
|
||||
private const val REQUEST_CHECK = "/api/request-check"
|
||||
private const val CHAT_LISTING = "/api/chat-listing"
|
||||
private const val CHAT_MESSAGES = "/api/chat-messages"
|
||||
private const val NOTIFICATIONS = "/api/notifications"
|
||||
private const val CATEGORIES = "/api/categories"
|
||||
private const val CLASSES = "/api/classes"
|
||||
private const val CLASS_DETAIL = "/api/class/detail"
|
||||
private const val ENROLL_USER = "/api/enroll-user"
|
||||
private const val CLASS_JOIN = "/api/class/join"
|
||||
private const val ORDER_CREATE = "/api/order/create"
|
||||
private const val SERVICES = "/api/services"
|
||||
private const val GET_FILTERS = "/api/get-filters"
|
||||
private const val GET_SLOTS = "/api/get-slots"
|
||||
private const val CALL_STATUS = "/api/call-status"
|
||||
private const val PAGES = "/api/pages"
|
||||
private const val PACK_SUB = "/api/pack-sub"
|
||||
private const val PURCHASE_PACK = "/api/sub-pack"
|
||||
private const val PACK_DETAIL = "/api/pack-detail"
|
||||
private const val SUBSCRIPTIONS = "/api/subscriptions"
|
||||
private const val SUBSCRIPTION_DETAIL = "/api/subscription-detail"
|
||||
private const val SUBSCRIPTION_PACK = "/api/subscription-pack"
|
||||
private const val ASK_QUESTIONS = "/api/ask-questions"
|
||||
private const val ASK_QUESTIONS_DETAIL = "/api/ask-question-detail"
|
||||
private const val WATER_LIMIT = "/api/water-limit"
|
||||
private const val PROTEIN_LIMIT = "/api/protein-limit"
|
||||
private const val DRINK_WATER = "/api/drink-water"
|
||||
private const val DRINK_PROTEIN = "/api/drink-protein"
|
||||
private const val ADD_FAMILY = "/api/add-family"
|
||||
private const val SYMPTOM = "/api/symptoms"
|
||||
private const val UPDATE_SYMPTOM = "/api/update-request-symptoms"
|
||||
private const val EXTRA_PAYMENT = "/api/pay-extra-payment"
|
||||
private const val CARE_PLANS = "/api/care-plans"
|
||||
private const val TIERS = "/api/tiers"
|
||||
private const val ADD_BANK = "/api/add-bank"
|
||||
private const val BANK_ACCOUNTS = "/api/bank-accounts"
|
||||
private const val GET_MEDICAL_HISTORY = "/api/get-medical-history"
|
||||
|
||||
private const val DIRECTIONS = "https://maps.googleapis.com/maps/api/directions/json"
|
||||
|
||||
private const val WORKING_HOURS = "/api/workingHours"
|
||||
private const val SPEAKOUT_LIST = "/common/listSpeakouts"
|
||||
|
||||
/*V2 Api*/
|
||||
private const val CREATE_REQUEST_V2 = "/api/v2/create-request"
|
||||
private const val CONFIRM_REQUEST_V2 = "/api/v2/confirm-request"
|
||||
private const val DOCTOR_LIST_V2 = "/api/v2/doctor-list"
|
||||
private const val CANCEL_REQUEST_V2 = "/api/v2/cancel-request"
|
||||
|
||||
private const val CONTACT_LIST = "/api/contact-list"
|
||||
private const val CONTACT_ADD = "/api/contact-add"
|
||||
private const val CONTACT_DELETE = "/api/contact-delete"
|
||||
private const val CONTACT_MESSAGE = "/api/contact-message"
|
||||
|
||||
}
|
||||
|
||||
/*POST APIS*/
|
||||
@FormUrlEncoded
|
||||
@POST(LOGIN)
|
||||
fun login(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<UserData>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(APP_VERSION)
|
||||
fun appVersion(@FieldMap hashMap: HashMap<String, String>): Call<ApiResponse<AppVersion>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UPDATE_NUMBER)
|
||||
fun updateNumber(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<UserData>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(VERIFY_OTP)
|
||||
fun verifyOtp(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<UserData>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(RESEND_OTP)
|
||||
fun resendOtp(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<UserData>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(REGISTER)
|
||||
fun register(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<UserData>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(FORGOT_PASSWORD)
|
||||
fun forgotPassword(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<UserData>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(CHANGE_PASSWORD)
|
||||
fun changePassword(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<UserData>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(PROFILE_UPDATE)
|
||||
fun updateProfile(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<UserData>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(COMPLETE_CHAT)
|
||||
fun completeChat(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(SEND_SMS)
|
||||
fun sendSMS(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<UserData>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(SEND_EMAIL_OTP)
|
||||
fun sendEmailOtp(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<UserData>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(EMAIL_VERIFY)
|
||||
fun emailVerify(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<UserData>>
|
||||
|
||||
@POST(LOGOUT)
|
||||
fun logout(): Call<ApiResponse<UserData>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UPDATE_FCM_ID)
|
||||
fun updateFcmId(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<UserData>>
|
||||
|
||||
@POST(CREATE_REQUEST)
|
||||
fun createRequest(@Body createRequest: CreateRequest): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@POST(CREATE_REQUEST_V2)
|
||||
fun createRequestV2(@Body createRequest: CreateRequest): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@POST(CONFIRM_REQUEST)
|
||||
fun confirmRequest(@Body createRequest: CreateRequest): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@POST(CONFIRM_REQUEST_V2)
|
||||
fun confirmRequestV2(@Body createRequest: CreateRequest): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ADD_CARD)
|
||||
fun addCard(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@POST(GET_CLIENT_SECRET)
|
||||
fun getClientSecret(): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(UPDATE_CARD)
|
||||
fun updateCard(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(DELETE_CARD)
|
||||
fun deleteCard(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ADD_MONEY)
|
||||
fun addMoney(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@Multipart
|
||||
@POST(UPLOAD_IMAGE)
|
||||
fun uploadFile(@PartMap map: HashMap<String, RequestBody>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ADD_REVIEW)
|
||||
fun addReview(@FieldMap hashMap: HashMap<String, String>): Call<ApiResponse<Any>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(REQUEST_USER_APPROVE)
|
||||
fun approveWorkingHour(@FieldMap hashMap: HashMap<String, String>): Call<ApiResponse<Any>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ENROLL_USER)
|
||||
fun enrollUser(@FieldMap hashMap: HashMap<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(CLASS_JOIN)
|
||||
fun joinClass(@FieldMap hashMap: HashMap<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ORDER_CREATE)
|
||||
fun orderCreate(@FieldMap hashMap: HashMap<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(CANCEL_REQUEST_V2)
|
||||
fun cancelRequest(@FieldMap hashMap: HashMap<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(CALL_STATUS)
|
||||
fun callStatus(@FieldMap hashMap: HashMap<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(PACK_DETAIL)
|
||||
fun packDetail(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(SUBSCRIPTION_DETAIL)
|
||||
fun subscriptionDetail(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(PURCHASE_PACK)
|
||||
fun purchasePack(@FieldMap hashMap: HashMap<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(SUBSCRIPTION_PACK)
|
||||
fun subscriptionPack(@FieldMap hashMap: HashMap<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ADD_FAVORITE)
|
||||
fun addFavorite(@Path("feed_id") feed_id: String,
|
||||
@FieldMap hashMap: HashMap<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ADD_LIKE)
|
||||
fun addLike(@Path("feed_id") feed_id: String,
|
||||
@FieldMap hashMap: HashMap<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ADD_COMMENT)
|
||||
fun addComment(@Path("feed_id") feed_id: String,
|
||||
@FieldMap hashMap: HashMap<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ASK_QUESTIONS)
|
||||
fun askQuestion(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(WATER_LIMIT)
|
||||
fun setDailyLimit(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<WaterIntake>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(PROTEIN_LIMIT)
|
||||
fun setProteinDailyLimit(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<WaterIntake>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(DRINK_WATER)
|
||||
fun setWaterIntake(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<WaterIntake>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(DRINK_PROTEIN)
|
||||
fun setProteinIntake(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<WaterIntake>>
|
||||
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ADD_FAMILY)
|
||||
fun addFamily(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@POST(UPDATE_SYMPTOM)
|
||||
fun updateSymptom(@Body updateSymptom: UpdateSymptom): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@POST(CARE_PLANS)
|
||||
fun carePlans(@Body updateSymptom: UpdateSymptom): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(ADD_BANK)
|
||||
fun addBank(@FieldMap hashMap: HashMap<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
|
||||
/*GET*/
|
||||
|
||||
@GET(CLIENT_DETAILS)
|
||||
fun clientDetails(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<AppVersion>>
|
||||
|
||||
@GET(COUNTRY_DATA)
|
||||
fun countryData(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(PREFERENCES)
|
||||
fun preferences(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(HOME)
|
||||
fun home(): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(REQUESTS)
|
||||
fun request(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(REQUEST_DETAIL)
|
||||
fun requestDetail(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(DOCTOR_LIST)
|
||||
fun doctorList(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(DOCTOR_LIST_V2)
|
||||
fun doctorListV2(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(BANNERS)
|
||||
fun banners(): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(DOCTOR_DETAIL)
|
||||
fun doctorDetails(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(REVIEW_LIST)
|
||||
fun reviewList(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(WALLET_HISTORY)
|
||||
fun walletHistory(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(CARD_LISTING)
|
||||
fun cardListing(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(WALLET)
|
||||
fun wallet(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(CHAT_LISTING)
|
||||
fun getChatListing(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(CHAT_MESSAGES)
|
||||
fun getChatMessage(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(NOTIFICATIONS)
|
||||
fun notifications(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(FEEDS)
|
||||
fun getFeeds(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(FEEDS_COMMENTS)
|
||||
fun getFeedsComment(@Path("feed_id") feed_id: String,
|
||||
@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(VIEW_FEEDS)
|
||||
fun viewFeeds(@Path("feed_id") feed_id: String): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
|
||||
@GET(CATEGORIES)
|
||||
fun categories(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(CLASSES)
|
||||
fun classesList(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(CLASS_DETAIL)
|
||||
fun classDetail(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<ClassData>>
|
||||
|
||||
@GET(GET_FILTERS)
|
||||
fun getFilters(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
|
||||
@GET(SERVICES)
|
||||
fun services(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(GET_SLOTS)
|
||||
fun getSlots(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(PAGES)
|
||||
fun getPages(): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(COUPONS)
|
||||
fun coupons(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(PACK_SUB)
|
||||
fun packSub(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(SUBSCRIPTIONS)
|
||||
fun subscriptions(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(DIRECTIONS)
|
||||
fun directions(@QueryMap hashMap: Map<String, String>): Call<Direction>
|
||||
|
||||
@GET(ASK_QUESTIONS)
|
||||
fun getQuestions(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(ASK_QUESTIONS_DETAIL)
|
||||
fun getQuestionsDetails(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(WATER_LIMIT)
|
||||
fun getWaterLimit(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<WaterIntake>>
|
||||
|
||||
@GET(PROTEIN_LIMIT)
|
||||
fun getProteinIntake(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<WaterIntake>>
|
||||
|
||||
@GET(REQUEST_CHECK)
|
||||
fun requestCheck(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(SYMPTOM)
|
||||
fun symptom(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(TIERS)
|
||||
fun carePlanTier(): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@POST(EXTRA_PAYMENT)
|
||||
fun payExtra(@Body extraPayment: Extra_payment): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(BANK_ACCOUNTS)
|
||||
fun bankAccounts(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@GET(GET_MEDICAL_HISTORY)
|
||||
fun getMedicalHistory(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
|
||||
/*PUT API*/
|
||||
@FormUrlEncoded
|
||||
@PUT(WORKING_HOURS)
|
||||
fun workingHours(@FieldMap hashMap: HashMap<String, String>): Call<ApiResponse<Any>>
|
||||
|
||||
|
||||
@GET(CONTACT_LIST)
|
||||
fun contactList(@QueryMap hashMap: Map<String, String>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@POST(CONTACT_ADD)
|
||||
fun addContact(@Body contactList: ContactEmergency): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(CONTACT_DELETE)
|
||||
fun deletContact(@FieldMap hashMap: HashMap<String, Any>): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
@POST(CONTACT_MESSAGE)
|
||||
fun sendMessage(): Call<ApiResponse<CommonDataModel>>
|
||||
|
||||
}
|
27
app/src/main/java/com/consultantapp/data/models/PushData.kt
Normal file
27
app/src/main/java/com/consultantapp/data/models/PushData.kt
Normal file
|
@ -0,0 +1,27 @@
|
|||
package com.consultantapp.data.models
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
data class PushData(
|
||||
val msg: String,
|
||||
var title: String,
|
||||
val sound: String,
|
||||
val pushType: String,
|
||||
val imageUrl: String,
|
||||
val message: String,
|
||||
val senderId: String,
|
||||
val senderName: String,
|
||||
val receiverId: String,
|
||||
val messageType: String,
|
||||
val request_id: String,
|
||||
val call_id: String,
|
||||
val service_type:String,
|
||||
val cut_from: String?= null,
|
||||
val main_service_type:String,
|
||||
val sentAt: Long,
|
||||
val request_time: String,
|
||||
val sender_name: String,
|
||||
val sender_image: String,
|
||||
val vendor_category_name: String,
|
||||
val transaction_id: String
|
||||
) : Serializable
|
|
@ -0,0 +1,29 @@
|
|||
package com.consultantapp.data.models.requests
|
||||
|
||||
class AppFeatures {
|
||||
var needUserDoctorScreen = false
|
||||
|
||||
var needWalkThrough = false
|
||||
var needLanguageScreen = false
|
||||
var needPackage = false
|
||||
|
||||
var needClasses = false
|
||||
|
||||
var needLocation = false
|
||||
|
||||
var subCategoryImageCenter = false
|
||||
|
||||
var homeConsultIcons = false
|
||||
|
||||
var needBlogs = false
|
||||
var needArticles = false
|
||||
|
||||
var needHealthTools = false
|
||||
|
||||
var signUpAddition = false
|
||||
var needInsuranceDocument = false
|
||||
|
||||
var needHomePatients = false
|
||||
var needTestimonials = false
|
||||
var needInviteCode = false
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
package com.consultantapp.data.models.requests
|
||||
|
||||
data class CarePlan (
|
||||
var id: Int? = null,
|
||||
var type: Int? = null
|
||||
)
|
|
@ -0,0 +1,7 @@
|
|||
package com.consultantapp.data.models.requests
|
||||
|
||||
data class ConsultTypeModel (
|
||||
var name: String? = null,
|
||||
var image: Int? = null,
|
||||
var type: String? = null
|
||||
)
|
|
@ -0,0 +1,23 @@
|
|||
package com.consultantapp.data.models.requests
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class CreateRequest : Serializable {
|
||||
var consultant_id: String? = null
|
||||
var schedule_type: String? = null
|
||||
var service_id: String? = null
|
||||
var request_id: String? = null
|
||||
var category_id: String? = null
|
||||
var date: String? = null
|
||||
var time: String? = null
|
||||
var end_date: String? = null
|
||||
var end_time: String? = null
|
||||
var coupon_code: String? = null
|
||||
|
||||
var service_address: String? = null
|
||||
var lat: Double? = null
|
||||
var long: Double? = null
|
||||
|
||||
var tier_id: Int? = null
|
||||
var tier_options:ArrayList<CarePlan>?=null
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package com.consultantapp.data.models.requests
|
||||
|
||||
class DatesAvailability {
|
||||
var displayName: String? = null
|
||||
var date: Long? = null
|
||||
var isSelected = false
|
||||
|
||||
/*Water intake*/
|
||||
var intakeAmount: Int? = null
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.consultantapp.data.models.requests
|
||||
|
||||
import java.io.File
|
||||
import java.io.Serializable
|
||||
|
||||
class DocImage : Serializable {
|
||||
var imageFile: File? = null
|
||||
var type: String? = null
|
||||
|
||||
var image: String? = null
|
||||
var insuranceNumber: String? = null
|
||||
var expiry: String? = null
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.consultantapp.data.models.requests
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
data class SaveAddress (
|
||||
var locationName: String? = null,
|
||||
var houseNumber: String? = null,
|
||||
var isDefault :Boolean = false,
|
||||
var _id: String? = null,
|
||||
var addressId: String? = null,
|
||||
|
||||
var lat: Double? = null,
|
||||
var long: Double? = null
|
||||
): Serializable
|
|
@ -0,0 +1,11 @@
|
|||
package com.consultantapp.data.models.requests
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class SetFilter :Serializable{
|
||||
var filter_id: Int? = null
|
||||
var filter_option_ids: ArrayList<String>? = null
|
||||
|
||||
var preference_id: Int? = null
|
||||
var option_ids: ArrayList<String>? = null
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.consultantapp.data.models.requests
|
||||
|
||||
import com.consultantapp.data.models.responses.Page
|
||||
import java.io.Serializable
|
||||
|
||||
|
||||
class UpdateSymptom : Serializable {
|
||||
var request_id: String? = null
|
||||
var image: ArrayList<DocImage>? = null
|
||||
var images: ArrayList<DocImage>? = null
|
||||
var option_ids: String? = null
|
||||
var symptom_details: String? = null
|
||||
|
||||
var care_plans: ArrayList<Page>? = null
|
||||
var question_answers:ArrayList<Page>?=null
|
||||
|
||||
var type: String? = null
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class AddPrescription : Serializable {
|
||||
var request_id: String? = null
|
||||
var type: String? = null
|
||||
|
||||
/*Manual*/
|
||||
var title: String? = null
|
||||
var image: ArrayList<String>? = null
|
||||
|
||||
var images: ArrayList<String>? = null
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
class Bank {
|
||||
|
||||
var id: String? = null
|
||||
var bank_name: String? = null
|
||||
var last_four_digit: String? = null
|
||||
var created_at: String? = null
|
||||
|
||||
var name: String? = null
|
||||
var ifc_code: String? = null
|
||||
var account_holder_type: String? = null
|
||||
var country: String? = null
|
||||
var currency: String? = null
|
||||
var account_number: String? = null
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
class Banner {
|
||||
var id: Int? = null
|
||||
var image_web: Any? = null
|
||||
var image_mobile: String? = null
|
||||
var position: String? = null
|
||||
var banner_type: String? = null
|
||||
var start_date: String? = null
|
||||
var end_date: String? = null
|
||||
var category_id: String? = null
|
||||
var category: Categories? = null
|
||||
var sp_id: String? = null
|
||||
var class_id: String? = null
|
||||
var created_at: String? = null
|
||||
var updated_at: String? = null
|
||||
|
||||
/*Coupon*/
|
||||
var service_id: String? = null
|
||||
var service :Service?=null
|
||||
var minimum_value: String? = null
|
||||
var limit: Int? = null
|
||||
var coupon_code: String? = null
|
||||
var maximum_discount_amount: String? = null
|
||||
var discount_type: String? = null
|
||||
var discount_value: String? = null
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
data class Cards (
|
||||
var data: List<Wallet>? = null
|
||||
): Serializable
|
|
@ -0,0 +1,20 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
data class Categories(
|
||||
var id: String? = null,
|
||||
var name: String? = null,
|
||||
var image: String? = null,
|
||||
var parent_id: String? = null,
|
||||
var created_at: String? = null,
|
||||
var color_code: String? = null,
|
||||
var description: String? = null,
|
||||
var image_icon: String? = null,
|
||||
var multi_select: String? = null,
|
||||
//var subcategory: List<Any>? = null
|
||||
var is_subcategory: Boolean? = null,
|
||||
var is_filters: Boolean? = null,
|
||||
) : Serializable {
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class ClassData :Serializable{
|
||||
var id: String? = null
|
||||
var name: String? = null
|
||||
var status: String? = null
|
||||
var class_date: String? = null
|
||||
var created_at: String? = null
|
||||
var bookingDateUTC: String? = null
|
||||
var price: String? = null
|
||||
var category_id: Int? = null
|
||||
var created_by: UserData? = null
|
||||
var booking_date: String? = null
|
||||
var time: String? = null
|
||||
var category_data: Categories? = null
|
||||
var enroll_users: List<Any>? = null
|
||||
var isOccupied = false
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import com.consultantapp.data.models.responses.chat.ChatList
|
||||
import com.consultantapp.data.models.responses.chat.ChatMessage
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
|
||||
class CommonDataModel {
|
||||
var client_secret: String? = null
|
||||
var message: String? = null
|
||||
var minimum_balance: String? = null
|
||||
var requests: List<Request>? = null
|
||||
var doctors: List<UserData>? = null
|
||||
var review_list: List<Review>? = null
|
||||
var dcotor_detail: UserData? = null
|
||||
var messages: List<ChatMessage>? = null
|
||||
var lists: List<ChatList>? = null
|
||||
var balance: String? = null
|
||||
var payments: List<Wallet>? = null
|
||||
var notifications: List<Notification>? = null
|
||||
// var cards: List<Wallet>? = null
|
||||
@SerializedName("cards")
|
||||
var cards: Cards? = null
|
||||
|
||||
var classes_category: List<Categories>? = null
|
||||
var classes: List<ClassData>? = null
|
||||
var filters: List<Filter>? = null
|
||||
var services: List<Service>? = null
|
||||
var interval: List<Interval>? = null
|
||||
var banners: List<Banner>? = null
|
||||
var coupons: List<Banner>? = null
|
||||
|
||||
/*Upload Image*/
|
||||
var image_name: String? = null
|
||||
|
||||
var request_status: String? = null
|
||||
var currentTimer: Long? = null
|
||||
|
||||
var isOnline: Boolean? = null
|
||||
var CALLING_TYPE: String? = null
|
||||
var order_id: String? = null
|
||||
|
||||
/*Create Request*/
|
||||
var amountNotSufficient: Boolean? = null
|
||||
|
||||
/*Twili*/
|
||||
var twilioToken: String? = null
|
||||
|
||||
/*Confirm Booking*/
|
||||
var total: String? = null
|
||||
var total_hours: String? = null
|
||||
var discount: String? = null
|
||||
var grand_total: String? = null
|
||||
var book_slot_time: String? = null
|
||||
var book_slot_date: String? = null
|
||||
var service_tax: String? = null
|
||||
var tier_charges: String? = null
|
||||
var tax_percantage: String? = null
|
||||
|
||||
/*Add money stripe authentication*/
|
||||
var requires_source_action: Boolean? = null
|
||||
var url: String? = null
|
||||
var transaction_id: String? = null
|
||||
var transactionCompleted: Boolean? = null
|
||||
|
||||
|
||||
/*Pages*/
|
||||
var pages: List<Page>? = null
|
||||
|
||||
|
||||
/*Country*/
|
||||
var type: String? = null
|
||||
var country: List<CountryCity>? = null
|
||||
var city: List<CountryCity>? = null
|
||||
var state: List<CountryCity>? = null
|
||||
|
||||
/*Package*/
|
||||
var packages: List<Packages>? = null
|
||||
var plans: List<Packages>? = null
|
||||
var active_plan: Boolean? = null
|
||||
var detail: Packages? = null
|
||||
|
||||
/*Home*/
|
||||
var top_blogs: List<Feed>? = null
|
||||
var top_articles: List<Feed>? = null
|
||||
var testimonials: List<Review>? = null
|
||||
|
||||
/*Feeds*/
|
||||
var feeds: List<Feed>? = null
|
||||
var feed: Feed? = null
|
||||
var comment: Feed? = null
|
||||
var comments: List<Feed>? = null
|
||||
var tips: List<Feed>? = null
|
||||
|
||||
/*SignUp*/
|
||||
var preferences: List<Filter>? = null
|
||||
|
||||
/*Request*/
|
||||
var request: Request? = null
|
||||
var request_detail: Request? = null
|
||||
|
||||
/*Home*/
|
||||
var questions: List<Feed>? = null
|
||||
var question: Feed? = null
|
||||
var can_ask_question: Boolean? = null
|
||||
|
||||
/*Family*/
|
||||
var family: UserData? = null
|
||||
|
||||
var symptoms: List<Filter>? = null
|
||||
var tiers: List<Filter>? = null
|
||||
|
||||
var bank_accounts: List<Bank>? = null
|
||||
|
||||
var count_data: CommonDataModel? = null
|
||||
|
||||
var contacts: List<ContactEmergency>? = null
|
||||
|
||||
var contact_added: Boolean? = null
|
||||
var notification_count: Int? = null
|
||||
|
||||
}
|
||||
|
||||
data class CallStatusResponse(
|
||||
var message: String? = null,
|
||||
var is_call_socket_enabled:String?=null,
|
||||
)
|
|
@ -0,0 +1,17 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
data class ContactEmergency(
|
||||
var id: String? = null,
|
||||
var contacts: ArrayList<ContactEmergency>? = null,
|
||||
|
||||
/*Contacts*/
|
||||
var name: String? = null,
|
||||
var phone_numbers: ArrayList<ContactEmergency>? = null,
|
||||
|
||||
/*Phone number*/
|
||||
var phone: String? = null,
|
||||
var type_label: String? = null
|
||||
|
||||
) : Serializable
|
|
@ -0,0 +1,8 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class CountryCity : Serializable {
|
||||
var id: String? = null
|
||||
var name: String? = null
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class Extra_detail :Serializable{
|
||||
var id: Int? = null
|
||||
var request_id: Int? = null
|
||||
var first_name: String? = null
|
||||
var last_name: String? = null
|
||||
var service_for: String? = null
|
||||
var home_care_req: String? = null
|
||||
var service_address: String? = null
|
||||
var lat: String? = null
|
||||
var long: String? = null
|
||||
var reason_for_service: String? = null
|
||||
var created_at: String? = null
|
||||
var updated_at: String? = null
|
||||
var start_time: String? = null
|
||||
var end_time: String? = null
|
||||
var working_dates: String? = null
|
||||
var filter_id: String? = null
|
||||
var filter_name: String? = null
|
||||
var distance: String? = null
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class Extra_payment :Serializable{
|
||||
var id: Int? = null
|
||||
var request_id: String? = null
|
||||
var balance: String? = null
|
||||
var description: String? = null
|
||||
var status: String? = null
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class Feed : Serializable {
|
||||
var id: String? = null
|
||||
var title: String? = null
|
||||
var image: String? = null
|
||||
var description: String? = null
|
||||
var like: Any? = null
|
||||
var user_id: Int? = null
|
||||
var created_at: String? = null
|
||||
var user_data: UserData? = null
|
||||
|
||||
var favorite: String? = null
|
||||
var views: String? = null
|
||||
var is_favorite: Boolean? = null
|
||||
|
||||
var type: String? = null
|
||||
var image_web: String? = null
|
||||
var image_mobile: String? = null
|
||||
var on_click_info: Any? = null
|
||||
var home_screen: Int? = null
|
||||
var enable: Int? = null
|
||||
var updated_at: String? = null
|
||||
var comment_count: Int? = null
|
||||
var is_like: Boolean? = null
|
||||
|
||||
|
||||
var feed_id: Int? = null
|
||||
var comment_id: Any? = null
|
||||
var comment: String? = null
|
||||
var user: UserData? = null
|
||||
|
||||
/*Ask Question*/
|
||||
var answers: List<Feed>? = null
|
||||
var answer: String? = null
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
data class Filter (
|
||||
var id: Int? = null,
|
||||
var category_id: Int? = null,
|
||||
var filter_name: String? = null,
|
||||
var preference_name: String? = null,
|
||||
var is_multi: String? = null,
|
||||
var options: List<FilterOption>? = null,
|
||||
|
||||
/*Options*/
|
||||
var option_name: String? = null,
|
||||
var filter_type_id: Int? = null,
|
||||
var isSelected :Boolean= false,
|
||||
|
||||
/*Symptom*/
|
||||
var name: String? = null,
|
||||
|
||||
var title: String? = null,
|
||||
var tier_options: List<Filter>? = null,
|
||||
var tier_options_select: ArrayList<Filter>? = null,
|
||||
var type: String? = null,
|
||||
var status: String? = null
|
||||
) :Serializable
|
|
@ -0,0 +1,11 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
data class FilterOption(
|
||||
var id: String? = null,
|
||||
var option_name: String? = null,
|
||||
var filter_type_id: Int? = null,
|
||||
|
||||
var isSelected: Boolean = false,
|
||||
) : Serializable
|
|
@ -0,0 +1,7 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
class Interval {
|
||||
var time: String? = null
|
||||
var available: Boolean? = null
|
||||
var isSelected=false
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class JitsiClass : Serializable {
|
||||
|
||||
var id: String? = null
|
||||
var call_id: String? = null
|
||||
var name: String? = null
|
||||
var callType: String? = null
|
||||
var isClass = false
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class Last_location :Serializable{
|
||||
var lat: Double? = null
|
||||
var long: Double? = null
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
|
||||
data class MedicalHistory (
|
||||
var id: Int? = null,
|
||||
var request_id: Int? = null,
|
||||
var comment: String? = null,
|
||||
var preference_name: String? = null,
|
||||
var request: MedicalHistory? = null,
|
||||
|
||||
/*Request*/
|
||||
var booking_date: String? = null
|
||||
) :Serializable
|
|
@ -0,0 +1,14 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
class Notification {
|
||||
|
||||
var id: String? = null
|
||||
var pushType: String? = null
|
||||
var message: String? = null
|
||||
var module: String? = null
|
||||
var module_id: String? = null
|
||||
var created_at: String? = null
|
||||
var read_status: String? = null
|
||||
var form_user:UserData?=null
|
||||
var to_user:UserData?=null
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class Packages : Serializable{
|
||||
var id: String? = null
|
||||
var title: String? = null
|
||||
var description: String? = null
|
||||
var price: String? = null
|
||||
var image: String? = null
|
||||
var total_requests: String? = null
|
||||
var available_requests: String? = null
|
||||
var category_id: String? = null
|
||||
var subscribe: Boolean? = null
|
||||
var expired_on_plan:String?=null
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
data class Page(
|
||||
var icon: Int? = null,
|
||||
|
||||
var slug: String? = null,
|
||||
var title: String? = null,
|
||||
var app_type: String? = null,
|
||||
|
||||
var desc: String? = null,
|
||||
|
||||
var question: String? = null,
|
||||
var answer: String? = null,
|
||||
|
||||
var status: String? = null
|
||||
) : Serializable
|
|
@ -0,0 +1,30 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class Profile :Serializable{
|
||||
|
||||
var id: Int? = null
|
||||
var avatar: Any? = null
|
||||
var title:String?=null
|
||||
var dob: String? = null
|
||||
var qualification: Any? = null
|
||||
var experience: Any? = null
|
||||
var rating: Any? = null
|
||||
var bio: String? = null
|
||||
var user_id: Int? = null
|
||||
var created_at: String? = null
|
||||
var updated_at: String? = null
|
||||
var working_since: String? = null
|
||||
|
||||
/*Address*/
|
||||
var address: String? = null
|
||||
var city: String? = null
|
||||
var state: String? = null
|
||||
var country: String? = null
|
||||
|
||||
var country_id: String? = null
|
||||
var state_id: String? = null
|
||||
var city_id: String? = null
|
||||
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import com.consultantapp.data.models.requests.DocImage
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import java.io.Serializable
|
||||
|
||||
class Request : Serializable {
|
||||
|
||||
var id: String? = null
|
||||
var booking_date: String? = null
|
||||
var from_user: UserData? = null
|
||||
var to_user: UserData? = null
|
||||
var time: String? = null
|
||||
var service_type: String? = null
|
||||
var main_service_type: String? = null
|
||||
var service: Service? = null
|
||||
var schedule_type: String? = null
|
||||
var service_id: String? = null
|
||||
var price: String? = null
|
||||
var status: String? = null
|
||||
var created_at: String? = null
|
||||
var rating: String? = null
|
||||
var bookingDateUTC: String? = null
|
||||
var booking_end_date: String? = null
|
||||
var canReschedule = false
|
||||
var canCancel = false
|
||||
|
||||
var is_prescription: Boolean? = null
|
||||
|
||||
var extra_detail: Extra_detail? = null
|
||||
var last_location: Last_location? = null
|
||||
|
||||
var symptoms: List<Filter>? = null
|
||||
var symptom_details: String? = null
|
||||
var symptom_images: List<DocImage>? = null
|
||||
var extra_payment: Extra_payment? = null
|
||||
|
||||
var cancel_reason: String? = null
|
||||
|
||||
var care_plans: List<Page>? = null
|
||||
var tier_detail: Filter? = null
|
||||
var question_answers: List<Page>? = null
|
||||
|
||||
var pre_scription: AddPrescription? = null
|
||||
|
||||
var categoryData: Categories? = null
|
||||
|
||||
var user_status: String? = null
|
||||
var user_comment: String? = null
|
||||
var total_hours :Double ?=null
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
class Review {
|
||||
|
||||
var id: Int? = null
|
||||
var from_user: Int? = null
|
||||
var rating: Float? = null
|
||||
var comment: String? = null
|
||||
var user: UserData? = null
|
||||
var consultant: UserData? = null
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import com.consultantapp.data.models.requests.SaveAddress
|
||||
import java.io.Serializable
|
||||
|
||||
|
||||
class Service : Serializable {
|
||||
var id: String? = null
|
||||
var category_id: Int? = null
|
||||
var service_id: String? = null
|
||||
var is_active: String? = null
|
||||
var price_minimum: Double? = null
|
||||
var price_maximum: Double? = null
|
||||
var price_fixed: Double? = null
|
||||
var minimum_duration: Int? = null
|
||||
var gap_duration: Int? = null
|
||||
var created_at: String? = null
|
||||
var updated_at: String? = null
|
||||
var name: String? = null
|
||||
var description: String? = null
|
||||
var need_availability: String? = null
|
||||
var price_type: String? = null
|
||||
|
||||
var isSelected = false
|
||||
var price: String? = null
|
||||
var unit_price: Double? = null
|
||||
var available: String? = null
|
||||
|
||||
var sp_id: Int? = null
|
||||
var category_service_id: Int? = null
|
||||
var duration: String? = null
|
||||
var minimmum_heads_up: String? = null
|
||||
var deleted_at: Any? = null
|
||||
var category_name: String? = null
|
||||
var service_name: String? = null
|
||||
var main_service_type: String? = null
|
||||
var color_code: String? = null
|
||||
var clinic_address: SaveAddress? = null
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class Subscription :Serializable{
|
||||
|
||||
var service_id: Int? = null
|
||||
var charges: String? = null
|
||||
var duration: Int? = null
|
||||
var type: String? = null
|
||||
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import com.consultantapp.data.models.requests.DocImage
|
||||
import com.consultantapp.data.models.requests.SaveAddress
|
||||
import com.consultantapp.data.models.responses.appdetails.Insurance
|
||||
import java.io.Serializable
|
||||
|
||||
class UserData : Serializable {
|
||||
var id: String? = null
|
||||
var name: String? = null
|
||||
var phone: String? = null
|
||||
var country_code: String? = null
|
||||
var profile_image: String? = null
|
||||
var fcm_id: String? = null
|
||||
var email: String? = null
|
||||
var email_verified_at: Any? = null
|
||||
var created_at: String? = null
|
||||
var updated_at: String? = null
|
||||
var token: String? = null
|
||||
var provider_type: String? = null
|
||||
var reference_code: String? = null
|
||||
var profile: Profile? = null
|
||||
var services: ArrayList<Service>? = null
|
||||
var categoryData: Categories? = null
|
||||
//var roles: List<Role>? = null
|
||||
|
||||
var subscriptions: List<Subscription>? = null
|
||||
var dob: String? = null
|
||||
var qualification: String? = null
|
||||
var patientCount: String? = null
|
||||
var experience: String? = null
|
||||
var speciality: String? = null
|
||||
var call_price: String? = null
|
||||
var chat_price: String? = null
|
||||
var totalRating: String? = null
|
||||
var reviewCount: String? = null
|
||||
var isAvailable = false
|
||||
|
||||
/*Insurance*/
|
||||
var insurance_enable: String? = null
|
||||
var insurances: ArrayList<Insurance>? = null
|
||||
var custom_fields: ArrayList<Insurance>? = null
|
||||
val insurance_images: ArrayList<String>? = null
|
||||
val insurance_info: ArrayList<DocImage>? = null
|
||||
|
||||
/*Prefrences*/
|
||||
var master_preferences: ArrayList<Filter>? = null
|
||||
|
||||
/*Family Member*/
|
||||
var family_members: ArrayList<UserData>? = null
|
||||
var user_id: Int? = null
|
||||
var first_name: String? = null
|
||||
var relation: String? = null
|
||||
var image: String? = null
|
||||
var medical_allergies: String? = null
|
||||
var chronic_diseases: String? = null
|
||||
var previous_surgeries: String? = null
|
||||
var previous_medication: String? = null
|
||||
var patient_type: String? = null
|
||||
|
||||
var medical_history: ArrayList<MedicalHistory>? = null
|
||||
var category:String?=null
|
||||
|
||||
|
||||
var charges: String? = null
|
||||
var duration: Int? = null
|
||||
var consultant_id: Int? = null
|
||||
var service_id: Int? = null
|
||||
var service_type: String? = null
|
||||
var doctor_data: UserData? = null
|
||||
var distance: String? = null
|
||||
var address_data: SaveAddress? = null
|
||||
var national_id:String?=null
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import java.io.Serializable
|
||||
|
||||
class Wallet :Serializable{
|
||||
|
||||
@SerializedName("id")
|
||||
var id: String? = null
|
||||
|
||||
@SerializedName("card")
|
||||
var cardDetails: CardDetails? = null
|
||||
// var brand: String? = null
|
||||
// var last4: String? = null
|
||||
// var id: String? = null
|
||||
var from: UserData? = null
|
||||
var to: UserData? = null
|
||||
var transaction_id: Int? = null
|
||||
var created_at: String? = null
|
||||
var updated_at: String? = null
|
||||
var type: String? = null
|
||||
var status:String?=null
|
||||
var closing_balance: String? = null
|
||||
var amount: String? = null
|
||||
var service_type: String? = null
|
||||
var call_duration: String? = null
|
||||
|
||||
/*Cards*/
|
||||
var isSelected = false
|
||||
var card_brand: String? = null
|
||||
var last_four_digit: String? = null
|
||||
|
||||
// Extracting values from the nested card object
|
||||
val brand: String?
|
||||
get() = cardDetails?.brand
|
||||
|
||||
val last4: String?
|
||||
get() = cardDetails?.last4
|
||||
|
||||
class CardDetails : Serializable {
|
||||
@SerializedName("brand")
|
||||
var brand: String? = null
|
||||
|
||||
@SerializedName("last4")
|
||||
var last4: String? = null
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.consultantapp.data.models.responses
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class WaterIntake : Serializable {
|
||||
var limit: Double? = null
|
||||
var total_achieved_goal: String? = null
|
||||
var today_intake: Double? = null
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package com.consultantapp.data.models.responses.appdetails
|
||||
|
||||
import com.consultantapp.data.models.responses.Page
|
||||
import java.util.*
|
||||
|
||||
class AppVersion {
|
||||
|
||||
var update_type: Int? = null
|
||||
var message: String? = null
|
||||
var privateKey: String? = null
|
||||
var publicKey: String? = null
|
||||
|
||||
var version_name: String? = null
|
||||
var current_version: Int? = null
|
||||
var charges: String? = null
|
||||
var audio_video: String? = null
|
||||
var class_calling: String? = null
|
||||
var unit_price: String? = null
|
||||
var slot_duration: String? = null
|
||||
var vendor_auto_approved: String? = null
|
||||
var currency: String? = null
|
||||
var jitsi_id: String? = null
|
||||
var applogo: String? = null
|
||||
var domain = ""
|
||||
/*Urls*/
|
||||
var domain_url: String? = null
|
||||
var media_url: String? = null
|
||||
var socket_url: String? = null
|
||||
var jitsi_meet_url: String? = null
|
||||
|
||||
var payment_type: String? = null
|
||||
var gateway_key: String? = null
|
||||
var payment_provider_mode:String ?=null
|
||||
var insurance: Boolean? = null
|
||||
var insurances: ArrayList<Insurance>? = null
|
||||
var custom_fields: CustomFields? = null
|
||||
var country_id: String? = null
|
||||
var country_name_code: String? = null
|
||||
var country_code: Int? = null
|
||||
|
||||
var client_features: ArrayList<ClientFeatures>? = null
|
||||
var clientFeaturesKeys = ClientFeaturesKeys()
|
||||
|
||||
/*Pages*/
|
||||
var pages: ArrayList<Page>? = null
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.consultantapp.data.models.responses.appdetails
|
||||
|
||||
class ClientFeatures {
|
||||
var client_feature_id: String? = null
|
||||
var client_id: String? = null
|
||||
var feature_id: String? = null
|
||||
//var feature_values: String? = null
|
||||
var name: String? = null
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
package com.consultantapp.data.models.responses.appdetails
|
||||
|
||||
class ClientFeaturesKeys {
|
||||
var isAddress: Boolean? = null
|
||||
var isInsurance: Boolean? = null
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.consultantapp.data.models.responses.appdetails
|
||||
|
||||
import java.util.*
|
||||
|
||||
class CustomFields {
|
||||
var service_provider: ArrayList<Insurance>? = null
|
||||
var customer: ArrayList<Insurance>? = null
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.consultantapp.data.models.responses.appdetails
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class Insurance :Serializable{
|
||||
var id: String? = null
|
||||
var category_id: String? = null
|
||||
var name: String? = null
|
||||
var company: String? = null
|
||||
var enable: String? = null
|
||||
var created_at: String? = null
|
||||
var updated_at: String? = null
|
||||
|
||||
var isSelected=false
|
||||
|
||||
|
||||
/*Fields*/
|
||||
var field_name: String? = null
|
||||
var field_value:String?=null
|
||||
var field_type: String? = null
|
||||
var required_sign_up: String? = null
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.consultantapp.data.models.responses.chat
|
||||
|
||||
import com.consultantapp.data.models.responses.UserData
|
||||
|
||||
data class ChatList(
|
||||
var image: String? = null,
|
||||
val isDelivered: Boolean? = null,
|
||||
val from_user: UserData? = null,
|
||||
val to_user: UserData? = null,
|
||||
var messageType: String? = null,
|
||||
val isRead: Boolean? = null,
|
||||
val video: Any? = null,
|
||||
var id: String? = null,
|
||||
var last_message: ChatMessage? = null,
|
||||
var unReadCount: Int,
|
||||
val chatType: Any? = null,
|
||||
val status: String? = null
|
||||
)
|
|
@ -0,0 +1,24 @@
|
|||
package com.consultantapp.data.models.responses.chat
|
||||
|
||||
import com.consultantapp.utils.MediaUploadStatus
|
||||
|
||||
data class ChatMessage(
|
||||
val imageUrl: String? = null,
|
||||
val message: String? = null,
|
||||
val senderId: String? = null,
|
||||
val senderName: String? = null,
|
||||
val receiverId: String? = null,
|
||||
var messageType: String? = null,
|
||||
val request_id: String? = null,
|
||||
val sentAt: Long? = null,
|
||||
var status: String? = null,
|
||||
|
||||
var conversationId: String? = null,
|
||||
//val deleteByList: List<Any>? = null,
|
||||
var isActive: Boolean? = null,
|
||||
var createAt: String? = null,
|
||||
var __v: Int? = null,
|
||||
var mediaUploadStatus: String = MediaUploadStatus.UPLOADED,
|
||||
var id: String? = null,
|
||||
var messageId: String? = null
|
||||
)
|
|
@ -0,0 +1,7 @@
|
|||
package com.consultantapp.data.models.responses.chat
|
||||
|
||||
data class Listing<out T>(
|
||||
val count: Int? = null,
|
||||
val isOnline: Boolean? = null,
|
||||
val listing: T? = null
|
||||
)
|
|
@ -0,0 +1,6 @@
|
|||
package com.consultantapp.data.models.responses.directions
|
||||
|
||||
class Bounds {
|
||||
var northeast: End_location? = null
|
||||
var southwest: End_location? = null
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.consultantapp.data.models.responses.directions
|
||||
|
||||
class Direction {
|
||||
var geocoded_waypoints: List<Geocoded_waypoint>? = null
|
||||
var routes: List<Route>? = null
|
||||
var status: String? = null
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
package com.consultantapp.data.models.responses.directions
|
||||
|
||||
class Distance {
|
||||
var text: String? = null
|
||||
var value: Int? = null
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
package com.consultantapp.data.models.responses.directions
|
||||
|
||||
class Duration {
|
||||
var text: String? = null
|
||||
var value: Int? = null
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
package com.consultantapp.data.models.responses.directions
|
||||
|
||||
class End_location {
|
||||
var lat: Double? = null
|
||||
var lng: Double? = null
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.consultantapp.data.models.responses.directions
|
||||
|
||||
class Geocoded_waypoint {
|
||||
var geocoder_status: String? = null
|
||||
var place_id: String? = null
|
||||
var types: List<String>? = null
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.consultantapp.data.models.responses.directions
|
||||
|
||||
class Leg {
|
||||
var distance: Distance? = null
|
||||
var duration: Duration? = null
|
||||
var end_address: String? = null
|
||||
var end_location: End_location? = null
|
||||
var start_address: String? = null
|
||||
var start_location: End_location? = null
|
||||
var steps: List<Step>? = null
|
||||
var traffic_speed_entry: List<Any>? = null
|
||||
var via_waypoint: List<Any>? = null
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
package com.consultantapp.data.models.responses.directions
|
||||
|
||||
class Overview_polyline {
|
||||
var points: String? = null
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
package com.consultantapp.data.models.responses.directions
|
||||
|
||||
class Polyline {
|
||||
var points: String? = null
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.consultantapp.data.models.responses.directions
|
||||
|
||||
class Route {
|
||||
var bounds: Bounds? = null
|
||||
var copyrights: String? = null
|
||||
var legs: List<Leg>? = null
|
||||
var overview_polyline: Overview_polyline? = null
|
||||
var summary: String? = null
|
||||
var warnings: List<Any>? = null
|
||||
var waypoint_order: List<Any>? = null
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.consultantapp.data.models.responses.directions
|
||||
|
||||
class Step {
|
||||
var distance: Distance? = null
|
||||
var duration: Duration? = null
|
||||
var end_location: End_location? = null
|
||||
var html_instructions: String? = null
|
||||
var polyline: Polyline? = null
|
||||
var start_location: End_location? = null
|
||||
var travel_mode: String? = null
|
||||
var maneuver: String? = null
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
package com.consultantapp.data.network
|
||||
|
||||
const val PER_PAGE_LOAD = 20
|
||||
const val HOME_CATEGORIES = 6
|
||||
const val PER_PAGE_LOAD_CHAT = 50
|
||||
|
||||
|
||||
object ApiKeys {
|
||||
/*facbook,google,email,phone*/
|
||||
const val PROVIDER_TYPE = "provider_type"
|
||||
|
||||
/*optional only phone and email*/
|
||||
const val PROVIDER_ID = "provider_id"
|
||||
|
||||
/*access_token or password or otp*/
|
||||
const val PROVIDER_VERIFICATION = "provider_verification"
|
||||
const val USER_TYPE = "user_type"
|
||||
|
||||
const val AFTER = "after"
|
||||
const val BEFORE = "before"
|
||||
const val PER_PAGE = "per_page"
|
||||
}
|
||||
|
||||
object ProviderType {
|
||||
const val google = "google"
|
||||
const val email = "email"
|
||||
const val phone = "phone"
|
||||
}
|
||||
|
||||
object LoadingStatus {
|
||||
const val ITEM = 0
|
||||
const val LOADING = 1
|
||||
}
|
||||
|
||||
|
||||
object PushType {
|
||||
const val CHAT = "chat"
|
||||
const val CHAT_STARTED = "CHAT_STARTED"
|
||||
const val REQUEST_COMPLETED = "REQUEST_COMPLETED"
|
||||
const val REQUEST_FAILED = "REQUEST_FAILED"
|
||||
const val CANCELED_REQUEST = "CANCELED_REQUEST"
|
||||
const val RESCHEDULED_REQUEST = "RESCHEDULED_REQUEST"
|
||||
const val UPCOMING_APPOINTMENT = "UPCOMING_APPOINTMENT"
|
||||
const val REQUEST_ACCEPTED = "Request Accepted"
|
||||
const val BOOKING_RESERVED = "BOOKING_RESERVED"
|
||||
const val CALL = "CALL"
|
||||
const val CALL_RINGING = "CALL_RINGING"
|
||||
const val CALL_ACCEPTED = "CALL_ACCEPTED"
|
||||
const val CALL_CANCELED = "CALL_CANCELED"
|
||||
const val BALANCE_ADDED = "BALANCE_ADDED"
|
||||
const val BALANCE_FAILED="BALANCE_FAILED"
|
||||
const val AMOUNT_RECEIVED = "AMOUNT_RECEIVED"
|
||||
const val BALANCE_DEDUCTED="BALANCE_DEDUCTED"
|
||||
const val BALANCE_REFUNDED="BALANCE_REFUNDED"
|
||||
const val PRESCRIPTION_ADDED = "PRESCRIPTION_ADDED"
|
||||
const val CARE_PLAN_DONE = "CARE_PLAN_DONE"
|
||||
|
||||
const val START = "START"
|
||||
const val REACHED = "REACHED"
|
||||
const val START_SERVICE = "START_SERVICE"
|
||||
const val CANCEL_SERVICE = "CANCEL_SERVICE"
|
||||
const val COMPLETED = "COMPLETED"
|
||||
const val QUESTION_ANSWERED="QUESTION_ANSWERED"
|
||||
const val WATER_INTAKE = "WATER_INTAKE"
|
||||
const val REQUEST_EXTRA_PAYMENT="REQUEST_EXTRA_PAYMENT"
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
package com.consultantapp.data.network
|
||||
|
||||
import android.app.Activity
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import com.consultantapp.R
|
||||
import com.consultantapp.data.network.responseUtil.AppError
|
||||
import com.consultantapp.utils.PrefsManager
|
||||
import com.consultantapp.utils.logoutUser
|
||||
|
||||
object ApisRespHandler {
|
||||
|
||||
private var alertDialog: AlertDialog.Builder? = null
|
||||
|
||||
fun handleError(error: AppError?, activity: Activity, prefsManager: PrefsManager) {
|
||||
error ?: return
|
||||
|
||||
|
||||
when (error) {
|
||||
is AppError.ApiError -> {
|
||||
if (alertDialog == null)
|
||||
errorMessage(activity, error.message)
|
||||
}
|
||||
|
||||
is AppError.ApiUnauthorized -> {
|
||||
if (alertDialog == null)
|
||||
sessionExpired(activity, error.message, prefsManager)
|
||||
}
|
||||
|
||||
is AppError.ApiAccountBlock -> {
|
||||
if (alertDialog == null)
|
||||
accountDeleted(activity, error.message, prefsManager)
|
||||
}
|
||||
|
||||
is AppError.ApiAccountRuleChanged -> {
|
||||
if (alertDialog == null)
|
||||
accountDeleted(activity, error.message, prefsManager)
|
||||
}
|
||||
|
||||
is AppError.ApiFailure -> {
|
||||
if (alertDialog == null) {
|
||||
if (error.message.contains("Failed to connect to",true) ||
|
||||
error.message.contains("Unable to resolve host",true) ||
|
||||
error.message.contains("No address associated with hostname",true))
|
||||
errorMessage(activity, activity.getString(R.string.check_internet))
|
||||
else
|
||||
errorMessage(activity, error.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun sessionExpired(activity: Activity, message: String?, prefsManager: PrefsManager) {
|
||||
try {
|
||||
alertDialog = AlertDialog.Builder(activity)
|
||||
alertDialog?.setCancelable(false)
|
||||
alertDialog?.setTitle(activity.getString(R.string.alert))
|
||||
alertDialog?.setMessage(message)
|
||||
alertDialog?.setPositiveButton(activity.getString(R.string.login)) { _, _ ->
|
||||
logoutUser(activity, prefsManager)
|
||||
|
||||
alertDialog = null
|
||||
}
|
||||
alertDialog?.show()
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun accountDeleted(activity: Activity, message: String?, prefsManager: PrefsManager) {
|
||||
try {
|
||||
alertDialog = AlertDialog.Builder(activity)
|
||||
alertDialog?.setCancelable(false)
|
||||
alertDialog?.setTitle(activity.getString(R.string.alert))
|
||||
alertDialog?.setMessage(message)
|
||||
alertDialog?.setPositiveButton(activity.getString(R.string.ok)) { _, _ ->
|
||||
logoutUser(activity, prefsManager)
|
||||
alertDialog = null
|
||||
}
|
||||
alertDialog?.show()
|
||||
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun errorMessage(activity: Activity, message: String?) {
|
||||
try {
|
||||
alertDialog = AlertDialog.Builder(activity)
|
||||
alertDialog?.setCancelable(false)
|
||||
alertDialog?.setTitle(activity.getString(R.string.alert))
|
||||
alertDialog?.setMessage(message)
|
||||
alertDialog?.setPositiveButton(activity.getString(R.string.ok)) { _, _ ->
|
||||
alertDialog = null
|
||||
}
|
||||
alertDialog?.show()
|
||||
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
31
app/src/main/java/com/consultantapp/data/network/Config.kt
Normal file
31
app/src/main/java/com/consultantapp/data/network/Config.kt
Normal file
|
@ -0,0 +1,31 @@
|
|||
package com.consultantapp.data.network
|
||||
|
||||
import com.consultantapp.BuildConfig
|
||||
|
||||
object Config {
|
||||
|
||||
var BASE_URL = ""
|
||||
|
||||
private val appMode = AppMode.LIVE
|
||||
|
||||
val baseURL: String
|
||||
get() {
|
||||
init(appMode)
|
||||
return BASE_URL
|
||||
}
|
||||
|
||||
private fun init(appMode: AppMode) {
|
||||
BASE_URL = when (appMode) {
|
||||
AppMode.DEV -> {
|
||||
BuildConfig.BASE_URL
|
||||
}
|
||||
AppMode.LIVE -> {
|
||||
BuildConfig.BASE_URL
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private enum class AppMode {
|
||||
DEV, LIVE
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
package com.consultantapp.data.network.responseUtil
|
||||
|
||||
data class ApiResponse<out T>(
|
||||
val message: String? = null,
|
||||
val data: T? = null
|
||||
)
|
|
@ -0,0 +1,54 @@
|
|||
package com.consultantapp.data.network.responseUtil
|
||||
|
||||
import okhttp3.MediaType.Companion.toMediaType
|
||||
import okhttp3.RequestBody
|
||||
import okhttp3.RequestBody.Companion.asRequestBody
|
||||
import org.json.JSONObject
|
||||
import retrofit2.Response
|
||||
import java.io.File
|
||||
|
||||
object ApiUtils {
|
||||
private fun getErrorMessage(errorJson: String?): String {
|
||||
if (errorJson.isNullOrBlank()) {
|
||||
return ""
|
||||
}
|
||||
|
||||
return try {
|
||||
val errorJsonObject = JSONObject(errorJson)
|
||||
errorJsonObject.getString("message")
|
||||
} catch (exception: Exception) {
|
||||
""
|
||||
}
|
||||
}
|
||||
|
||||
fun getError(statusCode: Int, errorJson: String?): AppError {
|
||||
val message = getErrorMessage(errorJson)
|
||||
return when (statusCode) {
|
||||
401 -> {
|
||||
AppError.ApiUnauthorized(message)
|
||||
}
|
||||
402 -> {
|
||||
AppError.ApiAccountBlock(message)
|
||||
}
|
||||
403 -> {
|
||||
AppError.ApiAccountRuleChanged(message)
|
||||
}
|
||||
else -> {
|
||||
AppError.ApiError(statusCode, message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun failure(throwable: Throwable): AppError {
|
||||
return AppError.ApiFailure(throwable.localizedMessage ?: "")
|
||||
}
|
||||
|
||||
fun imageToRequestBody(imageFile: File): RequestBody =imageFile.asRequestBody("image/*".toMediaType())
|
||||
|
||||
fun imageToRequestBodyKey(parameterName: String, fileName: String): String =
|
||||
"$parameterName\"; filename=\"$fileName"
|
||||
}
|
||||
|
||||
fun <T> Response<T>.getAppError(): AppError {
|
||||
return ApiUtils.getError(code(), errorBody()?.string())
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package com.consultantapp.data.network.responseUtil
|
||||
|
||||
sealed class AppError {
|
||||
data class ApiError(val statusCode: Int, val message: String) : AppError()
|
||||
data class ApiUnauthorized(val message: String) : AppError()
|
||||
data class ApiAccountBlock(val message: String) : AppError()
|
||||
data class ApiAccountRuleChanged(val message: String) : AppError()
|
||||
data class ApiFailure(val message: String) : AppError()
|
||||
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
package com.consultantapp.data.network.responseUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Data {
|
||||
private List<ImageItem> image;
|
||||
private String createdAt;
|
||||
private String subject;
|
||||
private int V;
|
||||
private String tenantId;
|
||||
private String description;
|
||||
private String id;
|
||||
private int type;
|
||||
private String ownerId;
|
||||
private String propertyId;
|
||||
private int status;
|
||||
private String updatedAt;
|
||||
|
||||
public List<ImageItem> getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(List<ImageItem> image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public String getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(String createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public String getSubject() {
|
||||
return subject;
|
||||
}
|
||||
|
||||
public void setSubject(String subject) {
|
||||
this.subject = subject;
|
||||
}
|
||||
|
||||
public int getV() {
|
||||
return V;
|
||||
}
|
||||
|
||||
public void setV(int V) {
|
||||
this.V = V;
|
||||
}
|
||||
|
||||
public String getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
public void setTenantId(String tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getOwnerId() {
|
||||
return ownerId;
|
||||
}
|
||||
|
||||
public void setOwnerId(String ownerId) {
|
||||
this.ownerId = ownerId;
|
||||
}
|
||||
|
||||
public String getPropertyId() {
|
||||
return propertyId;
|
||||
}
|
||||
|
||||
public void setPropertyId(String propertyId) {
|
||||
this.propertyId = propertyId;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getUpdatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(String updatedAt) {
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return
|
||||
"Template{" +
|
||||
"image = '" + image + '\'' +
|
||||
",createdAt = '" + createdAt + '\'' +
|
||||
",subject = '" + subject + '\'' +
|
||||
",__v = '" + V + '\'' +
|
||||
",tenantId = '" + tenantId + '\'' +
|
||||
",description = '" + description + '\'' +
|
||||
",_id = '" + id + '\'' +
|
||||
",type = '" + type + '\'' +
|
||||
",ownerId = '" + ownerId + '\'' +
|
||||
",propertyId = '" + propertyId + '\'' +
|
||||
",status = '" + status + '\'' +
|
||||
",updatedAt = '" + updatedAt + '\'' +
|
||||
"}";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.consultantapp.data.network.responseUtil
|
||||
|
||||
internal class ImageItem {
|
||||
var thumbnail: String? = null
|
||||
var original: String? = null
|
||||
var name: String? = null
|
||||
var id: String? = null
|
||||
var type: String? = null
|
||||
|
||||
override fun toString(): String {
|
||||
return "ImageItem{" +
|
||||
"thumbnail = '" + thumbnail + '\''.toString() +
|
||||
",original = '" + original + '\''.toString() +
|
||||
",name = '" + name + '\''.toString() +
|
||||
",_id = '" + id + '\''.toString() +
|
||||
",type = '" + type + '\''.toString() +
|
||||
"}"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.consultantapp.data.network.responseUtil
|
||||
|
||||
|
||||
/**
|
||||
* A generic class that holds a value with its loading status.
|
||||
* @param <T>
|
||||
</T> */
|
||||
data class Resource<out T>(val status: Status, val data: T?, val error: AppError?) {
|
||||
companion object {
|
||||
fun <T> success(data: T? = null): Resource<T> {
|
||||
return Resource(Status.SUCCESS, data, null)
|
||||
}
|
||||
|
||||
fun <T> error(error: AppError): Resource<T> {
|
||||
return Resource(Status.ERROR, null, error)
|
||||
}
|
||||
|
||||
fun <T> loading(): Resource<T> {
|
||||
return Resource(Status.LOADING, null, null)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.consultantapp.data.network.responseUtil
|
||||
|
||||
internal class Response {
|
||||
var msg: String? = null
|
||||
var data: Data? = null
|
||||
var statusCode: Int = 0
|
||||
|
||||
override fun toString(): String {
|
||||
return "Response{" +
|
||||
"msg = '" + msg + '\''.toString() +
|
||||
",data = '" + data + '\''.toString() +
|
||||
",statusCode = '" + statusCode + '\''.toString() +
|
||||
"}"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.consultantapp.data.network.responseUtil
|
||||
|
||||
/**
|
||||
* Status of a resource that is provided to the UI.
|
||||
*
|
||||
*
|
||||
* These are usually created by the Repository classes where they return
|
||||
* `LiveData<Resource<T>>` to pass back the latest data to the UI with its fetch status.
|
||||
*/
|
||||
enum class Status {
|
||||
SUCCESS,
|
||||
ERROR,
|
||||
LOADING
|
||||
}
|
143
app/src/main/java/com/consultantapp/data/repos/UserRepository.kt
Normal file
143
app/src/main/java/com/consultantapp/data/repos/UserRepository.kt
Normal file
|
@ -0,0 +1,143 @@
|
|||
package com.consultantapp.data.repos
|
||||
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.consultantapp.appClientDetails
|
||||
import com.consultantapp.data.apis.WebService
|
||||
import com.consultantapp.data.models.PushData
|
||||
import com.consultantapp.data.models.responses.CommonDataModel
|
||||
import com.consultantapp.data.models.responses.UserData
|
||||
import com.consultantapp.data.models.responses.appdetails.AppVersion
|
||||
import com.consultantapp.data.network.responseUtil.ApiResponse
|
||||
import com.consultantapp.data.network.responseUtil.Resource
|
||||
import com.consultantapp.utils.*
|
||||
import com.google.firebase.messaging.FirebaseMessaging
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
import kotlin.collections.ArrayList
|
||||
import kotlin.collections.HashMap
|
||||
|
||||
@Singleton
|
||||
class UserRepository @Inject constructor(
|
||||
private val prefsManager: PrefsManager,
|
||||
private val webService: WebService
|
||||
) {
|
||||
|
||||
val groupCreatedCall = MutableLiveData<String>()
|
||||
val loginGuestUser = MutableLiveData<String>()
|
||||
val groupExitResponse = MutableLiveData<Pair<Boolean, String>>()
|
||||
val pushData = MutableLiveData<PushData>()
|
||||
val isNewNotification = MutableLiveData<Boolean>()
|
||||
|
||||
fun isUserLoggedIn(): Boolean {
|
||||
val user = getUser()
|
||||
val appSetting = getAppSetting()
|
||||
|
||||
return if (user?.id.isNullOrEmpty() || user?.name.isNullOrEmpty() || user?.profile?.dob.isNullOrEmpty())
|
||||
false
|
||||
else if (appSetting.insurance == true && user?.insurance_enable == null)
|
||||
false
|
||||
else if (appSetting.clientFeaturesKeys.isAddress == true && user?.profile?.address.isNullOrEmpty())
|
||||
false
|
||||
else
|
||||
true
|
||||
}
|
||||
|
||||
fun getUser(): UserData? {
|
||||
return prefsManager.getObject(USER_DATA, UserData::class.java)
|
||||
}
|
||||
|
||||
fun getAppSetting(): AppVersion {
|
||||
return prefsManager.getObject(APP_DETAILS, AppVersion::class.java) ?: AppVersion()
|
||||
}
|
||||
|
||||
fun getUserLanguage(): String {
|
||||
return prefsManager.getString(USER_LANGUAGE, "")
|
||||
}
|
||||
|
||||
fun getPushCallData(): PushData? {
|
||||
return prefsManager.getObject(PUSH_DATA, PushData::class.java)
|
||||
}
|
||||
|
||||
fun pushTokenUpdate() {
|
||||
if (isUserLoggedIn()) {
|
||||
FirebaseMessaging.getInstance().token.addOnCompleteListener {
|
||||
if (it.isComplete) {
|
||||
|
||||
Log.d("FCMToken", it.result)
|
||||
|
||||
val hashMap = HashMap<String, Any>()
|
||||
hashMap["fcm_id"] = it.result
|
||||
|
||||
webService.updateFcmId(hashMap)
|
||||
.enqueue(object : Callback<ApiResponse<UserData>> {
|
||||
override fun onResponse(call: Call<ApiResponse<UserData>>,
|
||||
response: Response<ApiResponse<UserData>>) {
|
||||
if (response.isSuccessful) {
|
||||
Log.e("fcmToken", "Success")
|
||||
} else {
|
||||
Log.e("fcmToken", "Faliure")
|
||||
}
|
||||
}
|
||||
override fun onFailure(call: Call<ApiResponse<UserData>>,
|
||||
throwable: Throwable) {
|
||||
Log.e("fcmToken", "faliue 500")
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun callStatus(requestId: String, call_id: String, callStatus: String) {
|
||||
val hashMap = HashMap<String, String>()
|
||||
hashMap["request_id"] = requestId
|
||||
hashMap["call_id"] = call_id
|
||||
hashMap["status"] = callStatus
|
||||
|
||||
webService.callStatus(hashMap)
|
||||
.enqueue(object : Callback<ApiResponse<CommonDataModel>> {
|
||||
|
||||
override fun onResponse(call: Call<ApiResponse<CommonDataModel>>,
|
||||
response: Response<ApiResponse<CommonDataModel>>) {
|
||||
if (response.isSuccessful) {
|
||||
Log.e("fcmToken", "Success")
|
||||
} else {
|
||||
Log.e("fcmToken", "Faliure")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<ApiResponse<CommonDataModel>>,
|
||||
throwable: Throwable) {
|
||||
Log.e("fcmToken", "faliue 500")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun getPages() {
|
||||
webService.getPages()
|
||||
.enqueue(object : Callback<ApiResponse<CommonDataModel>> {
|
||||
override fun onResponse(call: Call<ApiResponse<CommonDataModel>>,
|
||||
response: Response<ApiResponse<CommonDataModel>>) {
|
||||
if (response.isSuccessful) {
|
||||
val commonData = Resource.success(response.body()?.data)
|
||||
val appDetails=getAppSetting()
|
||||
appDetails.pages=ArrayList()
|
||||
appDetails.pages?.addAll(commonData.data?.pages ?: emptyList())
|
||||
prefsManager.remove(APP_DETAILS)
|
||||
prefsManager.save(APP_DETAILS, appDetails)
|
||||
appClientDetails = getAppSetting()
|
||||
} else {
|
||||
Log.e("getPages", "Faliure")
|
||||
}
|
||||
}
|
||||
override fun onFailure(call: Call<ApiResponse<CommonDataModel>>, throwable: Throwable) {
|
||||
Log.e("getPages", "faliure 500")
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
47
app/src/main/java/com/consultantapp/di/AppModule.kt
Normal file
47
app/src/main/java/com/consultantapp/di/AppModule.kt
Normal file
|
@ -0,0 +1,47 @@
|
|||
package com.consultantapp.di
|
||||
|
||||
import android.content.Context
|
||||
import android.content.SharedPreferences
|
||||
import android.preference.PreferenceManager
|
||||
import com.consultantapp.ConsultantUserApplication
|
||||
import com.consultantapp.pushNotifications.MessagingService
|
||||
import com.google.gson.FieldNamingPolicy
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.GsonBuilder
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import javax.inject.Singleton
|
||||
|
||||
@InstallIn(SingletonComponent::class)
|
||||
@Module
|
||||
object AppModule {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
@JvmStatic
|
||||
fun provideContext(@ApplicationContext app: Context): Context = app
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
@JvmStatic
|
||||
fun provideMessagingService(messagingService: MessagingService): MessagingService = MessagingService()
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
@JvmStatic
|
||||
fun sharedPreferences(context: Context): SharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
@JvmStatic
|
||||
fun provideGson(): Gson {
|
||||
return GsonBuilder()
|
||||
.setFieldNamingPolicy(FieldNamingPolicy.IDENTITY)
|
||||
.setPrettyPrinting()
|
||||
.setLenient()
|
||||
.create()
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue