1.修复轨迹和宠物有时不在一条线上的bug

2.增加pet页切换刷新运动数据
3.修复绑定设备激活重启,此时点击太快进入wifi 搜索不到bug
4.蓝牙透传通路由Raw TCP改为Https
This commit is contained in:
2026-07-24 10:18:46 +08:00
parent f51e8f24de
commit 0a128cb8a6
19 changed files with 434 additions and 155 deletions

View File

@@ -42,6 +42,7 @@ import androidx.annotation.StringDef
EventName.BleGetLocation,
EventName.BleReportData,
EventName.LogReport,
EventName.BlePassThrough,
EventName.ActionConDeviceState
)
@Retention(AnnotationRetention.SOURCE)
@@ -112,5 +113,7 @@ annotation class EventName {
//设备固件版本
const val BleFirmwareVersion = "firmwareVersion"
//蓝牙透传
const val BlePassThrough = "blePassThrough"
}
}

View File

@@ -28,7 +28,7 @@ abstract class BaseNetworkApi<I>(private val baseUrl: String) : IService<I> {
getRetrofit().create(getServiceClass())
}
protected open fun getRetrofit(): Retrofit {
protected fun getRetrofit(): Retrofit {
//添加gson解析null拦截器
val gson = GsonBuilder().registerTypeAdapter(String::class.java, StringNullAdapter())
.registerTypeAdapter(Double::class.java, DoubleDefault0Adapter()).create()
@@ -37,6 +37,19 @@ abstract class BaseNetworkApi<I>(private val baseUrl: String) : IService<I> {
.addConverterFactory(GsonConverterFactory.create(gson)).build()
}
/**
* 二进制上传专用 独立 Retrofit 配置
*/
// protected val binaryService: I by lazy {
// binaryRetrofit().create(getServiceClass())
// }
// 无 Gson 解析,只处理原始流/二进制
// private fun binaryRetrofit(): Retrofit {
// return Retrofit.Builder().baseUrl(baseUrl).client(getOkHttpClient())
// .build()
// }
private fun getServiceClass(): Class<I> {
val genType = javaClass.genericSuperclass as ParameterizedType
return genType.actualTypeArguments[0] as Class<I>

View File

@@ -18,7 +18,8 @@ class AppUtils {
companion object {
private var isDebug: Boolean? = true
// private var isDebug: Boolean? = true
private var isDebug: Boolean? = null
/**
* 屏幕密度,系统源码注释不推荐使用
@@ -93,7 +94,7 @@ class AppUtils {
* 是否是国内
*/
fun isChina(type: String = SWITCH_PAGE_TYPE): Boolean {
return true
return false
if (isDebug()) {
if (type == SWITCH_MAP_TYPE && MMKVUtil.getBoolean(MMKVKey.OnlyGoogleMap, false)) {
//只启用谷歌地图