hmm mit den Event...
Ich hab das... vielleicht hilft es Dir?!
Delphi-Quellcode:
Function GetBatteryState:Integer;
begin
{$IFDEF IOS}
if TUIDevice.Wrap(TUIDevice.OCClass.currentDevice).isBatteryMonitoringEnabled
then Result := TUIDevice.Wrap(TUIDevice.OCClass.currentDevice).batteryState
else begin
TUIDevice.Wrap(TUIDevice.OCClass.currentDevice).setBatteryMonitoringEnabled(true);
if TUIDevice.Wrap(TUIDevice.OCClass.currentDevice).isBatteryMonitoringEnabled
then Result := TUIDevice.Wrap(TUIDevice.OCClass.currentDevice).batteryState
else result := 0;
end;
...
Android?!?
Mavarik