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; + } +} +