Total Battery Capacity in mAh of device Programmatically
I have tried powerprofile of Android....I have tried this code...but it gives me 1000 answer every time in all the devices... Is there any other way in android to get battery capacity... Eg.if mobile device capacity is 2000mAh it should return me 2000 public Double getBatteryCapacity() { Object mPowerProfile_ = null; double batteryCapacity = 0; final String POWER_PROFILE_CLASS = "com.android.internal.os.PowerProfile"; try { mPowerProfile_ = Class.forName(POWER_PROFILE_CLASS) .getConstructor(Context.class).newInstance(this); } catch (Exception e) { // Class not found? e.printStackTrace(); } try