expo-battery always returns unknown state and 100% charge

SDK Version: 45.0.0
Platforms: Android / iOS

import * as Battery from "expo-battery";

let battery;
if(await Battery.isAvailableAsync()) {
    battery = await Battery.getPowerStateAsync();

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?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.