diff --git a/app/src/main/java/com/example/cosmosclient/services/CosmosBackgroundService.java b/app/src/main/java/com/example/cosmosclient/services/CosmosBackgroundService.java index 9ac43be..8ea8e03 100644 --- a/app/src/main/java/com/example/cosmosclient/services/CosmosBackgroundService.java +++ b/app/src/main/java/com/example/cosmosclient/services/CosmosBackgroundService.java @@ -34,6 +34,7 @@ import java.io.FileDescriptor; import java.io.IOException; import java.io.PrintWriter; +import java.util.List; import java.util.TimeZone; import java.util.Timer; import java.util.TimerTask; @@ -52,6 +53,8 @@ private static final float MinDistance = 1;/*最小距離間隔*/ private boolean isServiceRunning = false; //サービスが起動しているかを確認 private String TAG = CosmosBackgroundService.class.getSimpleName(); + private List notifications =null; + public CosmosBackgroundService() { super("CosmosBackgroundService"); @@ -231,11 +234,13 @@ @Override public void onLocationChanged(Location location) { + final Cosmos cosmos = (Cosmos) getApplication(); // Log.d(TAG, "onLocationChanged"); Log.d(TAG, "lat:" + location.getLatitude()); Log.d(TAG, "lon:" + location.getLongitude()); updateAreaInformation(location); + this.notifications=searchNotifications(cosmos,location); } @@ -351,5 +356,9 @@ private void updateAreaInformation(Location location){ } + public List searchNotifications(Cosmos cosmos, Location location){ + + return null; + } }