feat: Realm增加查询Link的接口
This commit is contained in:
@@ -16,6 +16,7 @@ import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import io.realm.Realm
|
||||
import kotlinx.coroutines.*
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.logging.HttpLoggingInterceptor
|
||||
@@ -136,4 +137,10 @@ class GlobalModule {
|
||||
// fun provideRealmService(context: Application): RealmCoroutineScope {
|
||||
// return RealmCoroutineScope(context)
|
||||
// }
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
fun provideRealmDefaultInstance(): Realm {
|
||||
return Realm.getDefaultInstance()
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.navinfo.omqs.hilt
|
||||
|
||||
import com.navinfo.collect.library.map.NIMapController
|
||||
import com.navinfo.omqs.db.RealmOperateHelper
|
||||
import com.navinfo.omqs.db.RoomAppDatabase
|
||||
import com.navinfo.omqs.http.RetrofitNetworkServiceAPI
|
||||
import com.navinfo.omqs.http.offlinemapdownload.OfflineMapDownloadManager
|
||||
@@ -43,4 +44,9 @@ class MainActivityModule {
|
||||
// return MainViewModel(mapController)
|
||||
// }
|
||||
|
||||
@ActivityRetainedScoped
|
||||
@Provides
|
||||
fun providesRealmOperateHelper(): RealmOperateHelper {
|
||||
return RealmOperateHelper()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user