Created
January 15, 2021 22:41
-
-
Save DelphiWorlds/e4e4b8d9fb6c033dfcd99e23af1e4efa to your computer and use it in GitHub Desktop.
Put application in background on Android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uses | |
Androidapi.Helpers; | |
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState); | |
begin | |
if key = vkHardwareBack then | |
begin | |
Key := 0; | |
TAndroidHelper.Activity.moveTaskToBack(True); | |
end; | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment