How to minimize an Android app on Delphi?


I tried:

procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char;
Shift: TShiftState);
if Key = vkHardwareBack then begin
Key := 0;
Form1.WindowState := TWindowState.wsMinimized; // Also tried Application.MainForm

But when you hit the first time the screen gets black, when you hit the second time the app closes. How to avoid this?

Comments are closed.