1.增加首次定位体验优化-APP主动推送手机定位

2.适配固件-首次定位指令和蓝牙上报日志通道开启关闭
3.新的帮助页面ui和排版
4.删除历史轨迹偏移算法
This commit is contained in:
2026-08-07 19:07:11 +08:00
parent 6ae141d6f1
commit 0692d1e08b
34 changed files with 508 additions and 160 deletions

View File

@@ -1 +1 @@
#Fri Jul 31 17:44:57 CST 2026
#Fri Aug 07 11:10:38 CST 2026

View File

@@ -29,8 +29,8 @@ android {
minSdkVersion 24
targetSdkVersion 35
versionCode 2400
// versionName "2.4.0"
versionName "2.4.0-Beta1"
versionName "2.4.0"
// versionName "2.4.0-Beta1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@@ -43,10 +43,9 @@
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <!-- 读取缓存数据 -->
<!-- 蓝牙扫描权限 -->
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <!-- 获取模拟定位信息 -->
<!-- <uses-permission-->
<!-- android:name="android.permission.ACCESS_MOCK_LOCATION"-->
<!-- tools:ignore="MockLocation,ProtectedPermissions" />-->
<!-- <uses-permission -->
<!-- android:name="android.permission.ACCESS_MOCK_LOCATION" -->
<!-- tools:ignore="MockLocation,ProtectedPermissions" /> -->
<permission
android:name="android.permission.INTERACT_ACROSS_USERS_FULL"
android:protectionLevel="signature" /> <!-- *******************************************************极光推送start************************************************************************* -->
@@ -108,6 +107,9 @@
android:usesCleartextTraffic="true"
tools:replace="android:supportsRtl"
tools:targetApi="33">
<activity
android:name=".ui.activity.help.HelpTrackerStatusActivity"
android:exported="false" />
<activity
android:name=".ui.activity.account.cn.RegisterCNActivity"
android:exported="false" />
@@ -187,7 +189,7 @@
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.help.HelpTrackerStatusActivity"
android:name=".ui.activity.help.HelpCommonActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
@@ -632,9 +634,7 @@
android:value="${HTTP_REQUEST_KEY}" />
<meta-data
android:name="com.abbidot.metadata.card.rsa.key"
android:value="${CARD_RSA_KEY}" />
<!-- **************************************Stripe支付start********************************************* -->
android:value="${CARD_RSA_KEY}" /> <!-- **************************************Stripe支付start********************************************* -->
<!-- <meta-data -->
<!-- android:name="com.stripe.example.metadata.backend_url" -->
<!-- android:value="${BACKEND_URL}" /> -->

View File

@@ -141,7 +141,7 @@ class SplashActivity : QMUIActivity() {
private fun Activity.overrideTransitionClose(enter: Int, exit: Int) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
overrideActivityTransition(Activity.OVERRIDE_TRANSITION_CLOSE, enter, exit)
overrideActivityTransition(OVERRIDE_TRANSITION_CLOSE, enter, exit)
} else {
@Suppress("DEPRECATION")
overridePendingTransition(enter, exit)

View File

@@ -91,13 +91,13 @@ class AddNewTracker2Activity :
}
private fun scanFinished() {
if (againScan && mScanDeviceList.size == 0) {
if (againScan && mScanDeviceList.isEmpty()) {
againScan = false
LogUtil.e("没有扫描到设备,再次重试")
startScanBle()
return
}
if (mScanDeviceList.size > 0) {
if (mScanDeviceList.isNotEmpty()) {
val intent = Intent(mContext, AddNewTracker3Activity::class.java)
intent.putParcelableArrayListExtra(ConstantString.DeviceInfo, mScanDeviceList)
intent.putExtra(ConstantString.isFirstBind, isFirstBind)

View File

@@ -99,6 +99,7 @@ class AddNewTracker3Activity :
mViewBinding.ivAddNewTracker3RefreshBtn.isEnabled = true
if (ble.conState == ConState.CONNECTED) {
setNoConnectState()
if (!isFrontRunning) return@observe
val intent = Intent(mContext, AddPairedSuccessActivity::class.java)
intent.putExtra(ConstantString.DeviceOutId, mDeviceOutId)
intent.putExtra(ConstantString.isFirstBind, isFirstBind)
@@ -153,7 +154,7 @@ class AddNewTracker3Activity :
private fun setNoConnectState() {
mScanDeviceAdapter.apply {
getData().let {
if (it.size > 0) {
if (it.isNotEmpty()) {
isConnect = false
for (device in it) {
if (device.conState == ConState.CONNECTING) device.conState =
@@ -276,7 +277,7 @@ class AddNewTracker3Activity :
private fun scanFinished() {
mAnimatorSet?.cancel()
mViewBinding.ivAddNewTracker3RefreshBtn.isEnabled = true
if (isFrontRunning && mScanDeviceAdapter.getData().size == 0) {
if (isFrontRunning && mScanDeviceAdapter.getData().isEmpty()) {
ViewUtil.instance.showDialog(
mContext,
R.string.txt_no_search_device,

View File

@@ -0,0 +1,63 @@
package com.abbidot.tracker.ui.activity.help
import android.view.View
import android.widget.LinearLayout
import com.abbidot.baselibrary.util.AppUtils
import com.abbidot.tracker.R
import com.abbidot.tracker.base.BaseActivity
import com.abbidot.tracker.constant.ConstantInt
import com.abbidot.tracker.constant.ConstantString
import com.abbidot.tracker.databinding.ActivityHelpCommonBinding
class HelpCommonActivity :
BaseActivity<ActivityHelpCommonBinding>(ActivityHelpCommonBinding::inflate) {
private var mType = ConstantInt.Type0
override fun getTopBar() = mViewBinding.ilHelpCommonBar.titleTopBar
override fun initData() {
super.initData()
intent.extras?.apply {
mType = getInt(ConstantString.Type, ConstantInt.Type0)
}
mViewBinding.apply {
when (mType) {
1 -> {
setTopBarTitle(R.string.txt_sleep_mode)
setLeftBackImage(R.drawable.icon_white_back_svg)
ilHelpCommonTitle1.tvHelpTitleOne.setText(R.string.txt_sleep_mode_help)
val layoutManager =
ivHelpCommonImage.layoutParams as LinearLayout.LayoutParams
layoutManager.height = AppUtils.dpToPx(400)
ivHelpCommonImage.layoutParams = layoutManager
ivHelpCommonImage.setImageResource(R.drawable.help_sleep_mode)
}
2 -> {
setTopBarTitle(R.string.txt_wifi_zone_home)
setLeftBackImage(R.drawable.icon_white_back_svg)
ilHelpCommonTitle1.tvHelpTitleOne.setText(R.string.txt_wifi_zone_home_help)
val layoutManager =
ivHelpCommonImage.layoutParams as LinearLayout.LayoutParams
layoutManager.height = AppUtils.dpToPx(450)
ivHelpCommonImage.layoutParams = layoutManager
ivHelpCommonImage.setImageResource(R.drawable.help_wifi_zone)
}
3 -> {
setTopBarTitle(R.string.tracker_manage_set_duration)
setLeftBackImage(R.drawable.icon_white_back_svg)
ilHelpCommonTitle1.tvHelpTitleOne.setText(R.string.txt_gps_update_help)
val layoutManager =
ivHelpCommonImage.layoutParams as LinearLayout.LayoutParams
layoutManager.height = AppUtils.dpToPx(400)
ivHelpCommonImage.layoutParams = layoutManager
ivHelpCommonImage.setImageResource(R.drawable.help_gps_update)
llHelpCommonBoldLayout.visibility = View.VISIBLE
}
}
}
}
}

View File

@@ -1,12 +1,8 @@
package com.abbidot.tracker.ui.activity.help
import com.abbidot.tracker.R
import com.abbidot.tracker.adapter.HelpTextImageTypeAdapter
import com.abbidot.tracker.base.BaseActivity
import com.abbidot.tracker.bean.MenuTxtBean
import com.abbidot.tracker.constant.MultipleEntity
import com.abbidot.tracker.databinding.ActivityHelpCreatePetFenceBinding
import com.abbidot.tracker.util.ViewUtil
class HelpCreatePetFenceActivity :
BaseActivity<ActivityHelpCreatePetFenceBinding>(ActivityHelpCreatePetFenceBinding::inflate) {
@@ -18,50 +14,41 @@ class HelpCreatePetFenceActivity :
setTopBarTitle(R.string.txt_create_pet_fence)
setLeftBackImage(R.drawable.icon_white_back_svg)
val menuList = mutableListOf<MenuTxtBean>()
ViewUtil.instance.addMenuBean(
menuList, getString(R.string.txt_create_fence_tip1), menuType = MultipleEntity.IMG_IMG
)
ViewUtil.instance.addMenuBean(
menuList, "", imageResId = R.drawable.create_fence_help1, menuType = MultipleEntity.IMG
)
ViewUtil.instance.addMenuBean(
menuList, getString(R.string.txt_set_fence_type)
)
ViewUtil.instance.addMenuBean(
menuList, getString(R.string.txt_fence_type_help), menuType = MultipleEntity.IMG_IMG
)
ViewUtil.instance.addMenuBean(
menuList, getString(R.string.txt_set_boundary)
)
ViewUtil.instance.addMenuBean(
menuList, getString(R.string.txt_create_fence_tip2), menuType = MultipleEntity.IMG_IMG
)
ViewUtil.instance.addMenuBean(
menuList, "", imageResId = R.drawable.create_fence_help2, menuType = MultipleEntity.IMG
)
ViewUtil.instance.addMenuBean(
menuList, getString(R.string.txt_enable_set_notify)
)
ViewUtil.instance.addMenuBean(
menuList, getString(R.string.txt_create_fence_tip3), menuType = MultipleEntity.IMG_IMG
)
ViewUtil.instance.addMenuBean(
menuList, "", imageResId = R.drawable.create_fence_help4, menuType = MultipleEntity.IMG
)
ViewUtil.instance.addMenuBean(
menuList, getString(R.string.txt_edit_delete_fence)
)
// val menuList = mutableListOf<MenuTxtBean>()
// ViewUtil.instance.addMenuBean(
// menuList, getString(R.string.txt_create_fence_tip4), menuType = MultipleEntity.IMG_IMG
// menuList, "", imageResId = R.drawable.create_fence_help1, menuType = MultipleEntity.IMG
// )
// ViewUtil.instance.addMenuBean(
// menuList, getString(R.string.txt_set_fence_type)
// )
// ViewUtil.instance.addMenuBean(
// menuList, getString(R.string.txt_fence_type_help), menuType = MultipleEntity.IMG_IMG
// )
// ViewUtil.instance.addMenuBean(
// menuList, getString(R.string.txt_set_boundary)
// )
// ViewUtil.instance.addMenuBean(
// menuList, getString(R.string.txt_create_fence_tip2), menuType = MultipleEntity.IMG_IMG
// )
// ViewUtil.instance.addMenuBean(
// menuList, "", imageResId = R.drawable.create_fence_help3, menuType = MultipleEntity.IMG
// )
// ViewUtil.instance.addMenuBean(
// menuList, getString(R.string.txt_enable_set_notify)
// )
// ViewUtil.instance.addMenuBean(
// menuList, getString(R.string.txt_create_fence_tip3), menuType = MultipleEntity.IMG_IMG
// )
// ViewUtil.instance.addMenuBean(
// menuList, "", imageResId = R.drawable.create_fence_help4, menuType = MultipleEntity.IMG
// )
// ViewUtil.instance.addMenuBean(
// menuList, getString(R.string.txt_edit_delete_fence)
// )
val helpCreateFenceAdapter = HelpTextImageTypeAdapter(menuList)
ViewUtil.instance.setRecyclerViewVerticalLinearLayout(
mContext, mViewBinding.rvHelpCreatePetFenceContent, helpCreateFenceAdapter
)
// val helpCreateFenceAdapter = HelpTextImageTypeAdapter(menuList)
// ViewUtil.instance.setRecyclerViewVerticalLinearLayout(
// mContext, mViewBinding.rvHelpCreatePetFenceContent, helpCreateFenceAdapter
// )
}
}

View File

@@ -1,53 +1,19 @@
package com.abbidot.tracker.ui.activity.help
import android.view.View
import com.abbidot.tracker.R
import com.abbidot.tracker.base.BaseActivity
import com.abbidot.tracker.constant.ConstantInt
import com.abbidot.tracker.constant.ConstantString
import com.abbidot.tracker.databinding.ActivityHelpTrackerStatusBinding
class HelpTrackerStatusActivity :
BaseActivity<ActivityHelpTrackerStatusBinding>(ActivityHelpTrackerStatusBinding::inflate) {
private var mType = ConstantInt.Type0
override fun getTopBar() = mViewBinding.ilHelpTrackerStatusBar.titleTopBar
override fun initData() {
super.initData()
intent.extras?.apply {
mType = getInt(ConstantString.Type, ConstantInt.Type0)
}
setTopBarTitle(R.string.txt_check_tracker_status)
setLeftBackImage(R.drawable.icon_white_back_svg)
mViewBinding.apply {
when (mType) {
0 -> {
setTopBarTitle(R.string.txt_check_tracker_status)
setLeftBackImage(R.drawable.icon_white_back_svg)
ilHelpTrackerStatusTitle1.tvHelpTitleOne.setText(R.string.txt_check_tracker_status_top_tip)
}
1 -> {
setTopBarTitle(R.string.txt_sleep_mode)
setLeftBackImage(R.drawable.icon_white_back_svg)
ilHelpTrackerStatusTitle1.tvHelpTitleOne.setText(R.string.txt_sleep_mode_help)
ivHelpTrackerStatusImage.visibility = View.GONE
}
2 -> {
setTopBarTitle(R.string.txt_wifi_zone_home)
setLeftBackImage(R.drawable.icon_white_back_svg)
ilHelpTrackerStatusTitle1.tvHelpTitleOne.setText(R.string.txt_wifi_zone_home_help)
ivHelpTrackerStatusImage.visibility = View.GONE
}
3 -> {
setTopBarTitle(R.string.tracker_manage_set_duration)
setLeftBackImage(R.drawable.icon_white_back_svg)
ilHelpTrackerStatusTitle1.tvHelpTitleOne.setText(R.string.txt_gps_update_help)
ivHelpTrackerStatusImage.visibility = View.GONE
}
}
ilHelpTrackerStatusTitle1.tvHelpTitleOne.setText(R.string.txt_check_tracker_status_top_tip)
}
}
}

View File

@@ -41,19 +41,19 @@ class HowWorkActivity : BaseActivity<ActivityHowWorkBinding>(ActivityHowWorkBind
1 -> startActivity(Intent(mContext, HelpActiveTrackerActivity::class.java))
2 -> startActivity(Intent(mContext, HelpTrackerStatusActivity::class.java))
3 -> {
Intent(mContext, HelpTrackerStatusActivity::class.java).let {
Intent(mContext, HelpCommonActivity::class.java).let {
it.putExtra(ConstantString.Type, ConstantInt.Type1)
startActivity(it)
}
}
4 -> {
Intent(mContext, HelpTrackerStatusActivity::class.java).let {
Intent(mContext, HelpCommonActivity::class.java).let {
it.putExtra(ConstantString.Type, ConstantInt.Type2)
startActivity(it)
}
}
5 -> {
Intent(mContext, HelpTrackerStatusActivity::class.java).let {
Intent(mContext, HelpCommonActivity::class.java).let {
it.putExtra(ConstantString.Type, ConstantInt.Type3)
startActivity(it)
}

View File

@@ -413,7 +413,10 @@ class SureSubscriptionPlanActivity :
}
}
mGoogleLocationViewModel.mGoogleLocationLiveData.observe(this) {
mGeoCoderViewModel.getLatLonAddress(it.latitude, it.longitude)
// mGeoCoderViewModel.getLatLonAddress(it.latitude, it.longitude)
mSubscriptionViewModel.getTaxRateByRegionName(
mGeoCoderViewModel.mCountryCode, mGeoCoderViewModel.mRegion
)
}
mGeoCoderViewModel.mLatLonAddressLiveData.observe(this) {
mSubscriptionViewModel.getTaxRateByRegionName(

View File

@@ -514,13 +514,13 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
机动车行驶:epsilon=1.5~2.0,插值 3 个
**/
// 1. 降噪
val filterPoints = filterNoisePoint(data)
// 2. RDP平滑抽稀
val smoothPoints = rdpSmooth(filterPoints, epsilon = 0.5)
// 3. 插值加密线条
val finalPoints = latLngInterpolate(smoothPoints, step = 2)
// val filterPoints = filterNoisePoint(data)
// // 2. RDP平滑抽稀
// val smoothPoints = rdpSmooth(filterPoints, epsilon = 0.5)
// // 3. 插值加密线条
// val finalPoints = latLngInterpolate(smoothPoints, step = 2)
mHistoryDataList = finalPoints.toMutableList()
mHistoryDataList = data.toMutableList()
getHomeV2Activity()?.getPet(false)?.let {
mHistoryDataMapCommon.setPetBean(it)
}
@@ -534,17 +534,17 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
}
}
}
if (finalPoints.isEmpty()) {
if (data.isEmpty()) {
setSeekBarShowHide(false)
mHistoryDataMapCommon.setPetUserLatLng()
return@launch
}
setSeekBarShowHide(true)
val max = finalPoints.size - 1
val max = data.size - 1
setSeekBarMax(max)
mHistoryDataMapCommon.setLatLngData(finalPoints.toMutableList())
mHistoryDataMapCommon.setLatLngData(data.toMutableList())
}
}

View File

@@ -1077,7 +1077,7 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
showToast(R.string.txt_pet_close, gravity = Gravity.CENTER)
} else {
SRBleUtil.instance.isConnectBleSendCmdData(
pet.macID, SRBleCmdUtil.instance.refreshLocation(userGpsLat, userGpsLon)
pet.macID, SRBleCmdUtil.instance.refreshLocation(0x2C, userGpsLat, userGpsLon)
)
refreshLocationAnim()
}

View File

@@ -60,12 +60,16 @@ class PaypalPaymentFragment :
mViewBinding.apply {
root.visibility = View.VISIBLE
tvPaypalPaymentEmail.text = pId.paypalMethodInfo.email
tvPaypalPaymentEmail.visibility =
if (TextUtils.isEmpty(pId.paypalMethodInfo.email))
View.GONE
else
View.VISIBLE
ilPaypalPaymentNoData.root.visibility =
if (TextUtils.isEmpty(pId.paypalMethodInfo.email)) {
tvPaypalPaymentEmail.visibility = View.GONE
if (null == it.mOrderBean && TextUtils.isEmpty(pId.paypalMethodInfo.email)) {
View.VISIBLE
} else {
tvPaypalPaymentEmail.visibility = View.VISIBLE
View.GONE
}
}

View File

@@ -394,10 +394,10 @@ class SRBleCmdUtil private constructor() {
}
/**
* 刷新定位
* 刷新定位, 上传定位信息2c/2d
*/
fun refreshLocation(lat: Double, lon: Double): ByteArray {
var byteArray = byteArrayOf(0x2C, CMD_WRITE.toByte())
fun refreshLocation(cmd: Byte, lat: Double, lon: Double): ByteArray {
var byteArray = byteArrayOf(cmd, CMD_WRITE.toByte())
byteArray = byteArray.plus(longTo4ByteArray((lon * 1000000).toLong()))
byteArray = byteArray.plus(longTo4ByteArray((lat * 1000000).toLong()))
//单位是米/秒(m/s)

View File

@@ -253,6 +253,7 @@ class SRBleUtil private constructor() {
XEventBus.post(EventName.BlePassThrough, deviceData)
} else if (data0 == 0x09 && data1 == 0x00) {
val deviceData = ReceiveDeviceData(bleDevice, data, bleDevice.mac)
//获取固件版本并通知map页
if (isNotifyFirmware) {
isNotifyFirmware = false
XEventBus.post(EventName.BleFirmwareVersion, deviceData)
@@ -311,7 +312,9 @@ class SRBleUtil private constructor() {
.notify(bleDevice, uuidService, uuidNotify, object : BleNotifyCallback() {
override fun onNotifySuccess() {
LogUtil.e("打开日志上报通道成功:${bleDevice.name}--${bleDevice.mac}")
notifyDeviceState(bleDevice, ConState.CONNECTED)
openG40LogReportNotify(
bleDevice, logG40ServiceUUID, logG40NotifyCharacteristicUUID
)
}
override fun onNotifyFailure(exception: BleException?) {
@@ -340,12 +343,22 @@ class SRBleUtil private constructor() {
.notify(bleDevice, uuidService, uuidNotify, object : BleNotifyCallback() {
override fun onNotifySuccess() {
LogUtil.e("打开日志上报通道成功:${bleDevice.name}--${bleDevice.mac}")
notifyDeviceState(bleDevice, ConState.CONNECTED)
val userGpsLat = MMKVUtil.getDouble(MMKVKey.UserGpsLat)
val userGpsLon = MMKVUtil.getDouble(MMKVKey.UserGpsLon)
writeData(
bleDevice,
SRBleCmdUtil.instance.refreshLocation(0x2D, userGpsLat, userGpsLon)
)
}
override fun onNotifyFailure(exception: BleException?) {
LogUtil.e("打开日志上报通道失败:${bleDevice.mac},$exception")
notifyDeviceState(bleDevice, ConState.CONNECTED)
val userGpsLat = MMKVUtil.getDouble(MMKVKey.UserGpsLat)
val userGpsLon = MMKVUtil.getDouble(MMKVKey.UserGpsLon)
writeData(
bleDevice,
SRBleCmdUtil.instance.refreshLocation(0x2D, userGpsLat, userGpsLon)
)
}
override fun onCharacteristicChanged(data: ByteArray?) {
@@ -383,6 +396,10 @@ class SRBleUtil private constructor() {
LogUtil.e(
"writeData onWriteSuccess data:" + HexUtil.formatHexString(data, true)
)
val data0 = SRBleCmdUtil.instance.byteToInt(data[0])
if (data0 == 0x2D) {
notifyDeviceState(bleDevice, ConState.CONNECTED)
}
}
override fun onWriteFailure(exception: BleException?) {

View File

@@ -5,7 +5,9 @@ import android.content.Context
import android.location.Location
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.abbidot.baselibrary.constant.MMKVKey
import com.abbidot.baselibrary.util.LogUtil
import com.abbidot.baselibrary.util.MMKVUtil
import com.abbidot.tracker.util.LonAndLatUtil
import com.google.android.gms.location.FusedLocationProviderClient
import com.google.android.gms.location.LocationServices
@@ -39,8 +41,7 @@ class GoogleLocationViewModel : ViewModel() {
var location: Location? = null
if (taskLocation.isSuccessful && taskLocation.result != null) {
location = taskLocation.result
LonAndLatUtil.currentUserGPSLat = location.latitude
LonAndLatUtil.currentUserGPSLon = location.longitude
setLatLng(location)
LogUtil.e("Google,getLastLocation:${location.latitude}, ${location.longitude}")
} else {
LogUtil.e("Google,getLastLocation:exception" + taskLocation.exception)
@@ -75,8 +76,7 @@ class GoogleLocationViewModel : ViewModel() {
var location: Location? = null
val result = if (task.isSuccessful && task.result != null) {
location = task.result
LonAndLatUtil.currentUserGPSLat = location.latitude
LonAndLatUtil.currentUserGPSLon = location.longitude
setLatLng(location)
"(success): ${location.latitude}, ${location.longitude}"
} else {
val exception = task.exception
@@ -93,6 +93,17 @@ class GoogleLocationViewModel : ViewModel() {
}
}
private fun setLatLng(location: Location) {
location.apply {
MMKVUtil.putDouble(MMKVKey.UserGpsLat, latitude)
MMKVUtil.putDouble(MMKVKey.UserGpsLon, longitude)
//单位是米/秒(m/s)
MMKVUtil.putFloat(MMKVKey.UserGpsSpeed, speed)
LonAndLatUtil.currentUserGPSLat = location.latitude
LonAndLatUtil.currentUserGPSLon = location.longitude
}
}
private fun stopLocation() {
mCancellationTokenSource?.cancel()
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

View File

@@ -186,8 +186,7 @@
android:id="@+id/btn_save_new_credit_card"
style="@style/my_match_RoundRect_Button_style"
android:layout_marginHorizontal="@dimen/dp_16"
android:text="@string/txt_ok"
android:textAllCaps="true"
android:text="@string/acccount_btn_save"
app:qmui_radius="@dimen/dp_64"
app:typeface="@string/roboto_bold_font" />
</androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -43,6 +43,7 @@
app:typeface="@string/roboto_regular_font" />
<com.abbidot.tracker.widget.TypefaceTextView
android:id="@+id/tv_charge_power_on_step_one_tips"
style="@style/my_TextView_style_v2"
android:layout_alignTop="@id/tv_charge_power_on_step_one"
android:layout_marginStart="@dimen/dp_16"
@@ -56,8 +57,8 @@
<com.abbidot.tracker.widget.TypefaceTextView
android:id="@+id/tv_charge_power_on_step_two"
style="@style/my_TextView_style_v2"
android:layout_below="@id/tv_charge_power_on_step_one"
android:layout_marginTop="@dimen/dp_38"
android:layout_below="@id/tv_charge_power_on_step_one_tips"
android:layout_marginTop="@dimen/dp_12"
android:text="@string/txt_step_two"
android:textColor="@color/select_color3"
android:textSize="@dimen/textSize12"

View File

@@ -26,13 +26,11 @@
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="650dp"
android:layout_below="@id/il_help_active_tracker_dec"
android:layout_alignStart="@id/il_help_active_tracker_dec"
android:layout_alignEnd="@id/il_help_active_tracker_dec"
android:layout_marginTop="@dimen/dp_32"
android:background="@drawable/active_tracker_help"
android:scaleType="fitCenter" />
android:layout_centerVertical="true"
android:layout_marginTop="@dimen/dp_18"
android:src="@drawable/active_tracker_help" />
</RelativeLayout>
</androidx.core.widget.NestedScrollView>

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ui.activity.help.HelpCommonActivity">
<include
android:id="@+id/il_help_common_bar"
layout="@layout/layout_top_bar" />
<androidx.core.widget.NestedScrollView style="@style/my_ScrollView_style">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/dp_22"
android:layout_marginVertical="@dimen/dp_16"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/ll_help_common_bold_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_16"
android:orientation="horizontal"
android:visibility="gone">
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:gravity="start"
android:text="@string/txt_go_to"
android:textSize="@dimen/textSize16"
app:lineHeight="@dimen/textSize18" />
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_marginHorizontal="@dimen/dp_4"
android:gravity="start"
android:text="@string/txt_pet_tracker_gps"
android:textSize="@dimen/textSize16"
android:textStyle="bold"
app:lineHeight="@dimen/textSize18" />
</androidx.appcompat.widget.LinearLayoutCompat>
<include
android:id="@+id/il_help_common_title1"
layout="@layout/layout_help_title1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_help_common_image"
android:layout_width="wrap_content"
android:layout_height="650dp"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_28"
android:src="@drawable/help_tracker_status" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.core.widget.NestedScrollView>
</androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -10,10 +11,135 @@
android:id="@+id/il_help_create_pet_fence_bar"
layout="@layout/layout_top_bar" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_help_create_pet_fence_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginHorizontal="@dimen/dp_22"
android:paddingBottom="@dimen/dp_22" />
<androidx.core.widget.NestedScrollView style="@style/my_ScrollView_style">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/dp_22"
android:layout_marginVertical="@dimen/dp_16"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:gravity="start"
android:text="@string/txt_go_to"
android:textSize="@dimen/textSize16"
app:lineHeight="@dimen/textSize18" />
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_marginHorizontal="@dimen/dp_4"
android:gravity="start"
android:text="@string/txt_pet_fence_add"
android:textSize="@dimen/textSize16"
android:textStyle="bold"
app:lineHeight="@dimen/textSize18" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- <androidx.recyclerview.widget.RecyclerView-->
<!-- android:id="@+id/rv_help_create_pet_fence_content"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent" />-->
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="320dp"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_16"
android:src="@drawable/create_fence_help1" />
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_marginTop="@dimen/dp_18"
android:gravity="start"
android:text="@string/txt_set_fence_type"
android:textSize="@dimen/textSize16"
android:textStyle="bold"
app:lineHeight="@dimen/textSize18" />
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_marginTop="@dimen/dp_4"
android:gravity="start"
android:text="@string/txt_fence_type_help"
android:textSize="@dimen/textSize16"
app:lineHeight="@dimen/textSize18" />
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="700dp"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_6"
android:src="@drawable/create_fence_help5" />
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_marginTop="@dimen/dp_18"
android:gravity="start"
android:text="@string/txt_set_boundary"
android:textSize="@dimen/textSize16"
android:textStyle="bold"
app:lineHeight="@dimen/textSize18" />
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_marginTop="@dimen/dp_4"
android:gravity="start"
android:text="@string/txt_create_fence_tip2"
android:textSize="@dimen/textSize16"
app:lineHeight="@dimen/textSize18" />
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="560dp"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_12"
android:src="@drawable/create_fence_help2" />
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_marginTop="@dimen/dp_24"
android:gravity="start"
android:text="@string/txt_enable_set_notify"
android:textSize="@dimen/textSize16"
android:textStyle="bold"
app:lineHeight="@dimen/textSize18" />
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_marginTop="@dimen/dp_4"
android:gravity="start"
android:text="@string/txt_create_fence_tip3"
android:textSize="@dimen/textSize16"
app:lineHeight="@dimen/textSize18" />
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="250dp"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_12"
android:src="@drawable/create_fence_help4" />
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_marginTop="@dimen/dp_18"
android:gravity="start"
android:text="@string/txt_edit_delete_fence"
android:textSize="@dimen/textSize16"
android:textStyle="bold"
app:lineHeight="@dimen/textSize18" />
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="180dp"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_8"
android:src="@drawable/create_fence_help3" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.core.widget.NestedScrollView>
</androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -2,6 +2,7 @@
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
@@ -16,37 +17,130 @@
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_16"
android:layout_marginHorizontal="@dimen/dp_22"
android:layout_marginVertical="@dimen/dp_16"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:gravity="start"
android:text="@string/txt_go_to"
android:textSize="@dimen/textSize16"
app:lineHeight="@dimen/textSize18" />
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_marginHorizontal="@dimen/dp_4"
android:gravity="start"
android:text="@string/txt_pet_tracker"
android:textSize="@dimen/textSize16"
android:textStyle="bold"
app:lineHeight="@dimen/textSize18" />
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:gravity="start"
android:text="@string/txt_check"
android:textSize="@dimen/textSize16"
app:lineHeight="@dimen/textSize18" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:orientation="horizontal">
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="start"
android:text="@string/txt_help_status_network"
android:textSize="@dimen/textSize16"
app:lineHeight="@dimen/textSize18" />
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="start"
android:text="@string/txt_help_status_bluetooth"
android:textSize="@dimen/textSize16"
app:lineHeight="@dimen/textSize18" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="start"
android:text="@string/txt_help_status_wifi_zone"
android:textSize="@dimen/textSize16"
app:lineHeight="@dimen/textSize18" />
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="start"
android:text="@string/txt_help_status_battery"
android:textSize="@dimen/textSize16"
app:lineHeight="@dimen/textSize18" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="start"
android:text="@string/txt_help_status_gps"
android:textSize="@dimen/textSize16"
app:lineHeight="@dimen/textSize18" />
<com.abbidot.tracker.widget.TypefaceTextView
style="@style/my_TextView_style_v2"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="start"
android:text="@string/txt_help_status_led"
android:textSize="@dimen/textSize16"
app:lineHeight="@dimen/textSize18" />
</androidx.appcompat.widget.LinearLayoutCompat>
<include
android:id="@+id/il_help_tracker_status_title1"
layout="@layout/layout_help_title1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/dp_22"
android:layout_marginTop="@dimen/dp_18" />
<include
layout="@layout/layout_help_title2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/dp_22"
android:layout_marginTop="@dimen/dp_20"
android:visibility="gone" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_help_tracker_status_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="650dp"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_28"
android:background="@drawable/help_tracker_status"
android:scaleType="fitCenter" />
android:src="@drawable/help_tracker_status" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.core.widget.NestedScrollView>
</androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -880,7 +880,7 @@
<string name="txt_yesterday">Yesterday</string>
<string name="txt_power_on_off">Power On/Off</string>
<string name="txt_power_on_off_tip">Charge and unplug to turn on \nFlashing green light = on</string>
<string name="txt_active_tracker_tip">Choose a subscription \nTap to activate the tracker \nEnable GPS and cellular tracking</string>
<string name="txt_active_tracker_tip">1.Choose a subscription \n2.Tap to activate the tracker \n3.Enable GPS and cellular tracking</string>
<string name="txt_active_tracker">Active Tracker</string>
<string name="txt_check_tracker_status_tip">(The GPS and cellular network conditions can vary depending on the environment. Before placing it on your pet, check various locations around you to evaluate the GPS and network status.)</string>
<string name="txt_check_tracker_status">Check Tracker Status</string>
@@ -888,7 +888,6 @@
<string name="txt_tracker_battery_tip2">Connect the tracker to home WiFi (no password required). In the WiFi Zone, GPS activation is disabled. It connects to the network every 10–60 minutes, with very low power consumption.</string>
<string name="txt_tracker_battery_tip3">When your tracker is outside the WiFi Zone, it activates GPS and connects to the network every 3/5/10/15 minutes.</string>
<string name="txt_tracker_battery_life">Tracker Battery Life</string>
<string name="txt_create_fence_tip1">Go to Pet > My Pet Fence > Manage > + Add New</string>
<string name="txt_create_fence_tip2">Choose location and adjust radius or shapeSave fence to activate it</string>
<string name="txt_create_fence_tip3">Alerts when pet enters or leaves the zone</string>
<string name="txt_create_pet_fence">Create a Pet Fence</string>
@@ -967,7 +966,6 @@
<string name="txt_renewal_month2">/month on</string>
<string name="txt_replace_guarantee">Replacement Guarantee</string>
<string name="txt_enter_discount_code">Enter discount code</string>
<string name="txt_check">Check</string>
<string name="txt_annual_care_text">Annual Care</string>
<string name="txt_annual_care_text1">Annual Care: </string>
<string name="txt_ble_connect_fail">Bluetooth connection failed</string>
@@ -1017,7 +1015,7 @@
<string name="txt_account_exists_log_in">Account exists. Log in now?</string>
<string name="txt_time_out_of_range">Selected date is out of range</string>
<string name="txt_power_on_off_install_tip">Shake to turn on \nFlashing green light confirms on</string>
<string name="txt_check_tracker_status_top_tip">Go to Pet > Tracker Check \nNetwork \nGPS \nBattery \nWiFi Zone \nBluetooth \nLED \nGPS and cellular signals may vary by location \nTest in different locations before use</string>
<string name="txt_check_tracker_status_top_tip">GPS and cellular signals may vary by location. \nTest in different locations before use.</string>
<string name="txt_on_charging">Tracker is on charging</string>
<string name="txt_active_subscribed">Subscribed</string>
<string name="map_baidu_map">Baidu Maps</string>
@@ -1067,10 +1065,10 @@
<string name="txt_first_use">First use</string>
<string name="txt_daily_use">Daily use</string>
<string name="txt_sleep_mode">Sleep Mode</string>
<string name="txt_sleep_mode_help">15 minutes no movement → sleep mode \nAuto wake on movement \nBattery updates every 24 hours</string>
<string name="txt_sleep_mode_help">1.15 minutes no movement → sleep mode. \n2.Auto wake on movement. \n3.Battery updates every 24 hours.</string>
<string name="txt_wifi_zone_home">WiFi Zone(Home)</string>
<string name="txt_wifi_zone_home_help">Connect to home WiFi \nGPS off → save battery \nUpdate every ~60 minutes</string>
<string name="txt_gps_update_help">Pet > Tracker > GPS Update \nSelect 3–15 min \nShort interval = higher battery use \nDefault: 5 min</string>
<string name="txt_wifi_zone_home_help">1.Connect to home WiFi. \n2.GPS off → save battery. \n3.Update every ~60 minutes.</string>
<string name="txt_gps_update_help">1.Select 3–15 min. \n2.Short interval = higher battery use. \n3.Default: 5 min.</string>
<string name="txt_set_fence_type">Set Fence type</string>
<string name="txt_fence_type_help">Safe Zone or No-go Zone</string>
<string name="txt_set_boundary">Set boundary</string>
@@ -1089,4 +1087,15 @@
<string name="txt_subscription_terms_conditions_html">subscription_terms_conditions_en.html</string>
<string name="txt_phone_has_bound">该手机号码已被绑定</string>
<string name="txt_go_to">Go to</string>
<string name="txt_pet_tracker">Pet > Tracker</string>
<string name="txt_pet_tracker_gps">Pet > Tracker > GPS Update</string>
<string name="txt_pet_fence_add">Pet > My Pet Fence > Manage > + Add New</string>
<string name="txt_check">Check:</string>
<string name="txt_help_status_network">· Network</string>
<string name="txt_help_status_bluetooth">· Bluetooth</string>
<string name="txt_help_status_wifi_zone">· WiFi Zone</string>
<string name="txt_help_status_battery">· Battery</string>
<string name="txt_help_status_gps">· GPS</string>
<string name="txt_help_status_led">· LED</string>
</resources>