In my application, I want to do something when the battery is low. When battery is low android fires ACTION_BATTERY_LOW and when the battery again reaches to its good health it fires intent ACTION_BATTERY_OKAY. So, I have three questions regarding this:
1.At what battery percentage android actually fires ACTION_BATTERY_LOW?
2.Does it fire that same event repeatedly if the battery gets even lower?
3.Can we configure the battery percentage at which android will fire ACTION_BATTERY_LOW intent?
I am more concerned about the third point.
No, you cannot set when the ACTION_BATTERY_LOW threshold will be sent. That is a system level intent that is specified by the Android ROM. Here is the code where it sets the value in the Battery Service:
See the code below which is cut from the Android system code in the update method of the Battery Service: