Levente 1 Posted January 17, 2022 What is the best way to close the application completely under Android and iOS operating system. The application was developed for remote control of a device, the user must exit the application after completing the control task and the application can no longer run in the background. It doesn't work: procedure TMain.btn_ExitClick(Sender: TObject); begin IdIOHandlerStack1.Close; Application.Terminate; end; Share this post Link to post
qubits 20 Posted January 17, 2022 not sure about your apples but killed my robots like this.. {$IFDEF ANDROID} ReleaseWakeLock; MainActivity.finish; {$ENDIF} dave Share this post Link to post
Dave Nottage 557 Posted January 17, 2022 (edited) For Android, this is the only way I've found that will quit completely and remove the task from the "recent items" list: https://github.com/DelphiWorlds/Kastri/blob/64a5600e0845862f3e3991cd1708dee82a65ff45/Core/DW.Android.Helpers.pas#L561 For iOS, it's bound to have your app rejected if it is on the App Store, otherwise: https://developer.apple.com/library/archive/qa/qa1561/_index.html Edited January 17, 2022 by Dave Nottage 2 2 Share this post Link to post