增加评测link功能

This commit is contained in:
squallzhjch
2023-07-13 14:09:58 +08:00
parent ae44b848e2
commit 23a3490c20
29 changed files with 1346 additions and 362 deletions

View File

@@ -1,6 +1,8 @@
package com.navinfo.omqs.hilt
import android.app.Application
import android.content.Context
import android.content.SharedPreferences
import android.util.Log
import androidx.room.Room
import com.google.gson.Gson
@@ -25,7 +27,6 @@ import io.realm.Realm
import kotlinx.coroutines.*
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Call
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import java.util.concurrent.TimeUnit
@@ -38,6 +39,7 @@ import javax.inject.Singleton
@InstallIn(SingletonComponent::class)
class GlobalModule {
@Singleton
@Provides
fun provideApplication(@ApplicationContext application: Application): OMQSApplication {
@@ -166,4 +168,10 @@ class GlobalModule {
fun provideRealmDefaultInstance(): Realm {
return Realm.getDefaultInstance()
}
@Singleton
@Provides
fun provideSharedPreferences(context: Application): SharedPreferences {
return context.getSharedPreferences("Shared" + Constant.USER_ID, Context.MODE_PRIVATE)
}
}