diff --git a/bytheway/build.properties b/bytheway/build.properties index 01a9415..62b154d 100644 --- a/bytheway/build.properties +++ b/bytheway/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Fri Jul 03 13:02:58 HKT 2026 +#Mon Jul 06 13:56:29 CST 2026 stageCount=2 libraryProject= baseVersion=15.20 publishVersion=15.20.1 -buildCount=0 +buildCount=9 baseBetaVersion=15.20.2 diff --git a/bytheway/src/main/java/cc/winboll/studio/bytheway/activities/SettingsActivity.java b/bytheway/src/main/java/cc/winboll/studio/bytheway/activities/SettingsActivity.java index fae9242..20a6110 100644 --- a/bytheway/src/main/java/cc/winboll/studio/bytheway/activities/SettingsActivity.java +++ b/bytheway/src/main/java/cc/winboll/studio/bytheway/activities/SettingsActivity.java @@ -17,6 +17,7 @@ public class SettingsActivity extends Activity { setContentView(R.layout.activity_settings); Switch swGpsService = findViewById(R.id.sw_gps_service); + swGpsService.setChecked(GpsReceiveService.isServiceRunning()); swGpsService.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { diff --git a/bytheway/src/main/java/cc/winboll/studio/bytheway/services/GpsReceiveService.java b/bytheway/src/main/java/cc/winboll/studio/bytheway/services/GpsReceiveService.java index 5699fc2..721160b 100644 --- a/bytheway/src/main/java/cc/winboll/studio/bytheway/services/GpsReceiveService.java +++ b/bytheway/src/main/java/cc/winboll/studio/bytheway/services/GpsReceiveService.java @@ -30,6 +30,14 @@ public class GpsReceiveService extends Service { private GpsDbManager dbManager; private BroadcastReceiver gpsBroadcastReceiver; + /** + * 获取GPS定位服务运行状态 + * @return true=服务正在运行, false=服务未运行 + */ + public static boolean isServiceRunning() { + return serviceRunning; + } + /** * 外部统一静态启动服务 */