version:
fix: add:更新图标
@@ -5,6 +5,11 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
import com.amap.api.location.AMapLocation;
|
||||
import com.amap.api.location.AMapLocationClient;
|
||||
import com.amap.api.location.AMapLocationListener;
|
||||
import com.uiui.sn.manager.AmapManager;
|
||||
import com.uiui.sn.network.HTTPInterface;
|
||||
import com.uiui.sn.service.ControlPanelService;
|
||||
import com.uiui.sn.service.GuardService;
|
||||
import com.uiui.sn.service.MainService;
|
||||
@@ -15,7 +20,9 @@ import com.uiui.sn.service.StepService;
|
||||
|
||||
|
||||
public class BootReceiver extends BroadcastReceiver {
|
||||
private static String TAG = BootReceiver.class.getSimpleName();
|
||||
public static final String BOOT_COMPLETED = "zuoyeos.action.BOOT_COMPLETED";
|
||||
public static final String SOS = "zuoyeos.action.SOS";
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
@@ -43,6 +50,17 @@ public class BootReceiver extends BroadcastReceiver {
|
||||
context.startService(new Intent(context, DownloadService.class));
|
||||
context.startService(new Intent(context, ManagerService.class));
|
||||
context.startService(new Intent(context, ControlPanelService.class));
|
||||
} else if (SOS.equals(action)) {
|
||||
AMapLocationClient aMapLocationClient = AmapManager.getInstance().getLocationClient();
|
||||
aMapLocationClient.stopLocation();
|
||||
aMapLocationClient.startLocation();
|
||||
aMapLocationClient.setLocationListener(new AMapLocationListener() {
|
||||
@Override
|
||||
public void onLocationChanged(AMapLocation aMapLocation) {
|
||||
Log.e(TAG, "onLocationChanged: ");
|
||||
HTTPInterface.updateAdminInfo(context);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |