Class BatteryStateBroadcastReceiver



  • public class BatteryStateBroadcastReceiver
    extends BroadcastReceiver
    Used for tracking battery related events.

    We are mainly interested in the following states, which will be interrogated whenever we are deciding whether to launch a network request or not.

    • Intent#ACTION_BATTERY_OKAY
    • Intent#ACTION_BATTERY_LOW

    This BroadcastReceiver is registered in the SDK's manifest file. It is designed to provide updates to the PowerConfig class.

    See Also:
    Detecting power states
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void onReceive(Context context, Intent intent) 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BatteryStateBroadcastReceiver

        public BatteryStateBroadcastReceiver()
    • Method Detail

      • onReceive

        public void onReceive(Context context,
                              Intent intent)