package com.movisens.gattsensorexample.receivers; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; import com.movisens.gattsensorexample.application.App; public class SystemStateReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if (Intent.ACTION_SHUTDOWN.equals(intent.getAction())) { Log.d("SystemStateReceiver", "Shutdown"); App.app().shutDown(); } else if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) { Log.d("SystemStateReceiver", "BootComplete"); } } }