Einzelnen Beitrag anzeigen

Rollo62

Registriert seit: 15. Mär 2007
3.908 Beiträge
 
Delphi 12 Athens
 
#19

AW: Android-App und Hardware-Back

  Alt 10. Sep 2018, 13:10
Der Home Button beendet doch dein Programm, indem er es in den Hintergrund bringt.

Du kannst die ApplicationEvents abfragen, (WillBecomeInactive), und darauf reagieren.
Aber das iOS Home stoppen kannst du an der Stelle nicht mehr.

Delphi-Quellcode:

case AAppEvent of
      TApplicationEvent.FinishedLaunching : ;
      TApplicationEvent.BecameActive : ;
      TApplicationEvent.WillBecomeInactive : ;
      TApplicationEvent.EnteredBackground : ;
      TApplicationEvent.WillBecomeForeground: ;
      TApplicationEvent.WillTerminate : ;
      TApplicationEvent.LowMemory : ;
      TApplicationEvent.TimeChange : ;
      TApplicationEvent.OpenURL : ;
      else
                                              ;
  end;
Rollo
  Mit Zitat antworten Zitat