ACTION_BATTERY_CHANGED intent in service
<p>I am using this code to track battery information in my service:</p>

<pre><code>    Intent i = new ContextWrapper(applicationContext).registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
     // now you can get the level and scale from this intent variable
    int level = i.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
    int scale = i.getIntExtra(BatteryManager.EXTRA_SCALE, -1);

float battPct = level/(float)scale;
</code></pre>

<p>1.I want to know if it will change automatically then battery is changed? Or do I need to fire that intent by myself periodically?
2. Also I would like to know if there is a way to calculate how much time elapsed since 1% of remaining battery has been used.</p>
