SDK Version: 45.0.0
Platforms: Android / iOS
import * as Battery from "expo-battery";
let battery;
if(await Battery.isAvailableAsync()) {
battery = await Battery.getPowerStateAsync();
console.log(battery);
}
On the expo simulator the function seems to behave correctly, but when I generate a production build and install it on my device, I always get:
{ batteryLevel: 1, batteryState: 0, lowPowerMode: false }
Am I doing something wrong here?