title: Android BatteryManager returning 0 for all property-retrieval calls
body: <p>I'm having trouble trying to access most of the stats from my Android device's battery such as <code>BATTERY_PROPERTY_CAPACITY</code>, <code>BATTERY_PROPERTY_CHARGE_COUNTER</code> or <code>BATTERY_PROPERTY_CURRENT_AVERAGE</code>. These properties are all clearly documented here: <a href="http://developer.android.com/reference/android/os/BatteryManager.html" rel="nofollow">http://developer.android.com/reference/android/os/BatteryManager.html</a></p>
  
  <p>I have the following permission declared on my manifest:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.BATTERY_STATS" /&gt;
  </code></pre>
  
  <p>I have a non-null BatteryManager instance:</p>
  
  <pre><code>mBatteryManager = (BatteryManager) getSystemService(BATTERY_SERVICE);
  </code></pre>
  
  <p>And whenever I try to retrieve these stats:</p>
  
  <pre><code>double remainingCapacity = mBatteryManager.getIntProperty(
              BatteryManager.BATTERY_PROPERTY_CAPACITY);
  double batteryCapacityMicroAh = mBatteryManager.getIntProperty(
              BatteryManager.BATTERY_PROPERTY_CHARGE_COUNTER);
  double averageCurrentMicroA = mBatteryManager.getIntProperty(
              BatteryManager.BATTERY_PROPERTY_CURRENT_AVERAGE);
  </code></pre>
  
  <p>The results are all 0 for all of those. Always, without fail, 0. I've tried this on an emulator, an actual device, and everything I've thought of has failed to modify my results.</p>
  
  <p>I'd greatly appreciate any help. Ultimately, what I'm trying to do is calculate the time remaining for a device to reach its full charge (while charging). Thanks in advance.</p>