react-native-device-info - v15.0.1
    Preparing search index...

    Function useBatteryLevelIsLow

    • React hook that notifies when the battery crosses the low-level threshold.

      Compatibility: iOS ✅ Android ✅ Windows ✅ Web ✅ visionOS ✅

      Returns number | null

      function LowBatteryBanner() {
      const level = useBatteryLevelIsLow();
      if (level == null) {
      return null;
      }
      return <Banner title={`Battery low (${Math.round(level * 100)}%)`} />;
      }