Pakete, Repositories und App-Kategorien suchen

Paketdetailsv1.1.2

disable_battery_optimization

Flutter-Plugin zum Überprüfen und Deaktivieren von Batterieoptimierungen. Zeigt auch benutzerdefinierte Schritte zur Deaktivierung der Optimierungen auf Geräten wie Mi, Xiaomi, Samsung, Oppo, Huawei, OnePlus usw. an

Android
30-Tage-Downloads
13.900
Likes
129
Pub-Punkte
150

Paket installieren

flutter pub add disable_battery_optimization

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

Ein Flutter-Plugin, das die Batterieoptimierungen auf Android-Geräten überprüft und deaktiviert, besonders nützlich für Apps, die Hintergrundausführung erfordern. Es bietet maßgeschneiderte Anleitungen für beliebte Marken wie Xiaomi, Samsung, Oppo, Huawei und OnePlus und führt Benutzer Schritt für Schritt durch manuelle Einstellungen, um eine unterbrechungsfreie App-Leistung sicherzustellen. Das Plugin erhöht die Zuverlässigkeit von Diensten wie Standortverfolgung, Push-Benachrichtigungen und Hintergrund-Synchronisation, indem es verhindert, dass das Betriebssystem die App-Aktivität einschränkt.

Anwendungsfälle

  • Ausführung von Hintergrundaufgaben
  • Hintergrundortung
  • Zuverlässigkeit von Push-Benachrichtigungen
  • Lange laufende Daten-Synchronisierung
  • App-Leistungs-Optimierung
  • Batterielebensdauer-Management

Hauptmerkmale

  • Gerätespezifische Optimierungshinweise
  • Automatische Überprüfung der Batterieoptimierung
  • Unterstützung für große Android-Marken
  • Einfache Integration mit Flutter
  • Benutzeranweisungen löschen
  • Geräteübergreifende Kompatibilität

Geeignet für

  • Apps, die persistente Hintergrundprozesse benötigen
  • Entwickler, die auf Android-OEMs abzielen
  • Dienste, die eine zuverlässige Vordergrundausführung erfordern
  • Mobile Apps mit Echtzeit-Updates
  • Unternehmens- oder Nutzungsanwendungen

Hinweise

  • Erfordert nur Android-Plattform
  • Benutzerinteraktion für einige Schritte erforderlich
  • Beschränkt auf die aufgeführten Android-Gerätehersteller
  • Kann Berechtigungsanfragen erfordern
  • Nicht anwendbar auf iOS-Geräte

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

disable_battery_optimization

Flutter plugin to check and disable battery optimizations. Also shows custom steps to disable the manufacturer specific optimizations on devices like mi, xiaomi, samsung, oppo, huawei, oneplus etc


Auto start
bool isAutoStartEnabled = await DisableBatteryOptimization.isAutoStartEnabled;

This will return true, for the devices which doesn't support auto start configuration as well for the devices on which, user has clicked on positive action for the auto start configuration dialog.

await DisableBatteryOptimization.showEnableAutoStartSettings("Enable Auto Start", "Follow the steps and enable the auto start of this app");

This will show a dialog with steps to enable auto start permission on the current device (if it's available)

Note: We cannot determine if the user has actually enabled the auto start permission or not. We can only show a dialog with the steps to enable.


Android Battery Optimization
bool isBatteryOptimizationDisabled = await DisableBatteryOptimization.isBatteryOptimizationDisabled;

This will return true, only if the user has disabled the 'native' battery optimization for this app.

await DisableBatteryOptimization.showDisableBatteryOptimizationSettings();

This will ask for the permission to disable battery optimization for the app.


Manufacturer specific Battery Optimization
bool isManBatteryOptimizationDisabled = await DisableBatteryOptimization.isManufacturerBatteryOptimizationDisabled;

This will return true, for the devices which doesn't support manufacturer specific battery optimization configuration as well for the devices on which, user has clicked on positive action for the manufacturer specific battery optimization configuration dialog.

await DisableBatteryOptimization.showDisableManufacturerBatteryOptimizationSettings("Your device has additional battery optimization", "Follow the steps and disable the optimizations to allow smooth functioning of this app");

This will show a dialog with steps to disable the manufacturer specific battery optimization on the current device (if it's available)

Note: We cannot determine if the user has actually disabled the manufacturer specific battery optimization or not. We can only show a dialog with the steps to disable it.


There are other helper methods available to check if all the permissions are enabled or disabled.

await DisableBatteryOptimization.isAllBatteryOptimizationDisabled
await DisableBatteryOptimization.showDisableAllOptimizationsSettings

Kategorien

Quell-Repository

Projekte, die dieses Paket verwenden