增加离线地图下载流程

This commit is contained in:
squallzhjch
2023-04-03 10:40:53 +08:00
parent ca1be58db2
commit dcc5f581fb
23 changed files with 705 additions and 178 deletions

View File

@@ -54,7 +54,8 @@ class GlobalModule {
}
}.apply {
level = if (Constant.DEBUG) {
HttpLoggingInterceptor.Level.BODY
//坑 下载文件时打印log 内存不足
HttpLoggingInterceptor.Level.HEADERS
} else {
HttpLoggingInterceptor.Level.NONE
}

View File

@@ -2,6 +2,7 @@ package com.navinfo.omqs.hilt
import android.content.Context
import com.navinfo.collect.library.map.NIMapController
import com.navinfo.omqs.http.RetrofitNetworkServiceAPI
import com.navinfo.omqs.http.offlinemapdownload.OfflineMapDownloadManager
import dagger.Module
import dagger.Provides
@@ -26,8 +27,10 @@ class MainActivityModule {
*/
@ActivityRetainedScoped
@Provides
fun providesOfflineMapDownloadManager(@ActivityContext context: Context): OfflineMapDownloadManager =
OfflineMapDownloadManager(context)
fun providesOfflineMapDownloadManager(
networkServiceAPI: RetrofitNetworkServiceAPI
): OfflineMapDownloadManager =
OfflineMapDownloadManager( networkServiceAPI)
/**
* 实验失败这样创建viewmodel不会在activity销毁的时候同时销毁
@@ -35,7 +38,6 @@ class MainActivityModule {
// @ActivityRetainedScoped
// @Provides
// fun providesMainViewModel(mapController: NIMapController): MainViewModel {
// Log.e("jingo", "MainViewModel 被创建")
// return MainViewModel(mapController)
// }