From 9c16685c1f2a466580cc13ab3074597c4431902e Mon Sep 17 00:00:00 2001 From: ZhanGSKen Date: Thu, 7 May 2026 14:35:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BA=94=E7=94=A8GPS?= =?UTF-8?q?=E8=AE=A2=E9=98=85=E7=A4=BA=E4=BE=8B=E6=9C=8D=E5=8A=A1=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GpsReceiverChildService1.java | 27 +++++++++++++++++++ .../GpsReceiverChildService2.java | 26 ++++++++++++++++++ .../GpsReceiverChildService3.java | 26 ++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 gpsrelaysentinel/src/main/java/cc/winboll/studio/gpsrelaysentinel/GpsReceiverChildService1.java create mode 100644 gpsrelaysentinel/src/main/java/cc/winboll/studio/gpsrelaysentinel/GpsReceiverChildService2.java create mode 100644 gpsrelaysentinel/src/main/java/cc/winboll/studio/gpsrelaysentinel/GpsReceiverChildService3.java diff --git a/gpsrelaysentinel/src/main/java/cc/winboll/studio/gpsrelaysentinel/GpsReceiverChildService1.java b/gpsrelaysentinel/src/main/java/cc/winboll/studio/gpsrelaysentinel/GpsReceiverChildService1.java new file mode 100644 index 0000000..d65cce0 --- /dev/null +++ b/gpsrelaysentinel/src/main/java/cc/winboll/studio/gpsrelaysentinel/GpsReceiverChildService1.java @@ -0,0 +1,27 @@ +package cc.winboll.studio.gpsrelaysentinel; + +import android.content.Intent; + +import cc.winboll.studio.libappbase.LogUtils; +import cc.winboll.studio.libgpsrelaysentinel.model.GpsSubscribeMsg; +import cc.winboll.studio.libgpsrelaysentinel.model.LocationPoint; +import cc.winboll.studio.libgpsrelaysentinel.service.GpsSubscribeReceiverService; + +public final class GpsReceiverChildService1 extends GpsSubscribeReceiverService { + + public static final String TAG = "GpsReceiverChildService1"; + + @Override + public void onReceiveGpsData(LocationPoint point, GpsSubscribeMsg config) { + super.onReceiveGpsData(point, config); + //当前独立接收日志 + LogUtils.d(TAG,"独立接收服务1 成功收到GPS消息"); + LogUtils.d(TAG,"纬度:"+point.getLatitude()+" 经度:"+point.getLongitude()); + } + + @Override + public int onStartCommand(Intent intent, int flags, int startId) { + return START_NOT_STICKY; + } +} + diff --git a/gpsrelaysentinel/src/main/java/cc/winboll/studio/gpsrelaysentinel/GpsReceiverChildService2.java b/gpsrelaysentinel/src/main/java/cc/winboll/studio/gpsrelaysentinel/GpsReceiverChildService2.java new file mode 100644 index 0000000..d058f92 --- /dev/null +++ b/gpsrelaysentinel/src/main/java/cc/winboll/studio/gpsrelaysentinel/GpsReceiverChildService2.java @@ -0,0 +1,26 @@ +package cc.winboll.studio.gpsrelaysentinel; + +import android.content.Intent; + +import cc.winboll.studio.libappbase.LogUtils; +import cc.winboll.studio.libgpsrelaysentinel.model.GpsSubscribeMsg; +import cc.winboll.studio.libgpsrelaysentinel.model.LocationPoint; +import cc.winboll.studio.libgpsrelaysentinel.service.GpsSubscribeReceiverService; + +public final class GpsReceiverChildService2 extends GpsSubscribeReceiverService { + + public static final String TAG = "GpsReceiverChildService2"; + + @Override + public void onReceiveGpsData(LocationPoint point, GpsSubscribeMsg config) { + super.onReceiveGpsData(point, config); + LogUtils.d(TAG,"独立接收服务2 成功收到GPS消息"); + LogUtils.d(TAG,"纬度:"+point.getLatitude()+" 经度:"+point.getLongitude()); + } + + @Override + public int onStartCommand(Intent intent, int flags, int startId) { + return START_NOT_STICKY; + } +} + diff --git a/gpsrelaysentinel/src/main/java/cc/winboll/studio/gpsrelaysentinel/GpsReceiverChildService3.java b/gpsrelaysentinel/src/main/java/cc/winboll/studio/gpsrelaysentinel/GpsReceiverChildService3.java new file mode 100644 index 0000000..fb04c12 --- /dev/null +++ b/gpsrelaysentinel/src/main/java/cc/winboll/studio/gpsrelaysentinel/GpsReceiverChildService3.java @@ -0,0 +1,26 @@ +package cc.winboll.studio.gpsrelaysentinel; + +import android.content.Intent; + +import cc.winboll.studio.libappbase.LogUtils; +import cc.winboll.studio.libgpsrelaysentinel.model.GpsSubscribeMsg; +import cc.winboll.studio.libgpsrelaysentinel.model.LocationPoint; +import cc.winboll.studio.libgpsrelaysentinel.service.GpsSubscribeReceiverService; + +public final class GpsReceiverChildService3 extends GpsSubscribeReceiverService { + + public static final String TAG = "GpsReceiverChildService3"; + + @Override + public void onReceiveGpsData(LocationPoint point, GpsSubscribeMsg config) { + super.onReceiveGpsData(point, config); + LogUtils.d(TAG,"独立接收服务3 成功收到GPS消息"); + LogUtils.d(TAG,"纬度:"+point.getLatitude()+" 经度:"+point.getLongitude()); + } + + @Override + public int onStartCommand(Intent intent, int flags, int startId) { + return START_NOT_STICKY; + } +} +