g40添加wifi不显示名字为空的wifi

This commit is contained in:
2026-08-28 16:06:33 +08:00
parent fc400bc647
commit 7473653c8c
7 changed files with 41 additions and 30 deletions

View File

@@ -30,7 +30,7 @@ android {
targetSdkVersion 35
versionCode 2500
// versionName "2.5.0"
versionName "2.5.0-Beta1"
versionName "2.5.0-Beta4"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@@ -128,7 +128,7 @@ interface INetworkService {
@FormUrlEncoded
@POST("user/login")
suspend fun login(
@Field("phone") phone: String, @Field("password") password: String,
@Field("email") email: String, @Field("password") password: String,
@Field("languageCode") languageCode: String
): BaseResponse<UserBean>

View File

@@ -8,6 +8,7 @@ import android.net.wifi.ScanResult
import android.net.wifi.WifiManager
import android.os.Build
import android.provider.Settings
import android.text.TextUtils
import android.view.Gravity
import android.view.View
import androidx.activity.result.contract.ActivityResultContracts
@@ -297,13 +298,14 @@ class AddWifiPowerZone3Activity :
wifi.SSID
}
bleWifi.name = wifiName.replace("\"", "")
if (!TextUtils.isEmpty(bleWifi.name))
wifiList.add(bleWifi)
break
}
}
}
}
if (wifiList.size > 0) {
if (wifiList.isNotEmpty()) {
showWifiData(wifiList)
} else {
showToast(R.string.txt_time_out_try_again, true)

View File

@@ -4,6 +4,7 @@ import android.content.Intent
import android.graphics.Paint
import android.view.Gravity
import android.view.View
import android.widget.RadioGroup
import androidx.activity.viewModels
import com.abbidot.baselibrary.constant.EventName
import com.abbidot.baselibrary.constant.MMKVKey
@@ -27,6 +28,7 @@ import com.abbidot.tracker.util.ViewUtil
import com.abbidot.tracker.vm.GeoCoderViewModel
import com.abbidot.tracker.vm.GoogleLocationViewModel
import com.abbidot.tracker.vm.SubscriptionManageViewModel
import com.abbidot.tracker.widget.TypefaceRoundButton
import com.google.android.material.bottomsheet.BottomSheetDialog
import kotlin.math.abs
@@ -491,28 +493,28 @@ class SureSubscriptionPlanActivity :
mViewBinding.apply {
when (v!!) {
btnSureSubscribePlan1Continue -> {
// if (AppUtils.isChina()) {
// if (null == mRechargePayOptionsCn) {
// mRechargePayOptionsCn = ViewUtil.instance.showBottomSheet(
// mContext,
// R.layout.layout_recharge_pay_options_cn
// ).apply {
// setOnClickListenerViews(findViewById<TypefaceRoundButton>(R.id.btn_pay_cn_chose_sure))
// findViewById<RadioGroup>(R.id.rg_pay_cn_chose)?.let {
// it.setOnCheckedChangeListener { _, checkedId ->
// when (checkedId) {
// R.id.rb_pay_cn_chose_alipay -> mPayCnOption =
// ConstantInt.Type0
//
// R.id.rb_pay_cn_chose_wxpay -> mPayCnOption =
// ConstantInt.Type1
// }
// }
// }
// }
// }
// return
// }
if (AppUtils.isChina()) {
if (null == mRechargePayOptionsCn) {
mRechargePayOptionsCn = ViewUtil.instance.showBottomSheet(
mContext,
R.layout.layout_recharge_pay_options_cn
).apply {
setOnClickListenerViews(findViewById<TypefaceRoundButton>(R.id.btn_pay_cn_chose_sure))
findViewById<RadioGroup>(R.id.rg_pay_cn_chose)?.let {
it.setOnCheckedChangeListener { _, checkedId ->
when (checkedId) {
R.id.rb_pay_cn_chose_alipay -> mPayCnOption =
ConstantInt.Type0
R.id.rb_pay_cn_chose_wxpay -> mPayCnOption =
ConstantInt.Type1
}
}
}
}
}
return
}
createOrder()
}

View File

@@ -214,7 +214,7 @@ class CreateAccountV2ThreeFragment : BaseFragment<FragmentCreateAccountV2ThreeBi
password = Utils.get32Md5Value(password)
var e = ""
var p = ""
val locale = Locale.getDefault()
Locale.getDefault()
if (AppUtils.isChina()) p = email
else e = email
// mUserViewModel.registerV2(
@@ -222,7 +222,7 @@ class CreateAccountV2ThreeFragment : BaseFragment<FragmentCreateAccountV2ThreeBi
// )
setButtonEnabled(btnCreateAccountV2Signup, ConstantInt.Type0)
mUserViewModel.registerV2(
it, e, p, password, name, locale.country.uppercase(), mWXCode
it, e, p, password, name, AppUtils.getCountry(), mWXCode
)
}
}

View File

@@ -155,7 +155,6 @@ abstract class BaseBaiduMapFragment :
.build()
// LogUtil.e("百度定位成功返回: ${loc.latitude}, ${loc.longitude}")
setMyLocationData(locData)
locationSuccess(loc)
}
onMapLoadOk(this)
@@ -215,6 +214,10 @@ abstract class BaseBaiduMapFragment :
MyLocationData.Builder().latitude(it.latitude).longitude(it.longitude)
.build()
setMyLocationData(locData)
val bdLocation = BDLocation()
bdLocation.latitude = userGpsLat
bdLocation.longitude = userGpsLon
locationSuccess(bdLocation)
}
}
}

View File

@@ -5,6 +5,7 @@ import android.content.Context
import android.content.pm.PackageManager
import android.graphics.Point
import android.location.Location
import android.location.LocationManager
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
@@ -219,13 +220,16 @@ abstract class BaseGoogleMapFragment :
XEventBus.observe(viewLifecycleOwner, EventName.LocationData) { loc: Location ->
setUserLocationData(loc.latitude, loc.longitude)
locationSuccess(loc)
}
val userGpsLat = MMKVUtil.getDouble(MMKVKey.UserGpsLat)
val userGpsLon = MMKVUtil.getDouble(MMKVKey.UserGpsLon)
if (userGpsLat != 0.0 || userGpsLon != 0.0) {
setUserLocationData(userGpsLat, userGpsLon)
val location = Location(LocationManager.GPS_PROVIDER)
location.latitude = userGpsLat
location.longitude = userGpsLon
locationSuccess(location)
}
onMapLoadOk(googleMap)