I'm writing an app for an Android tablet in Delphi XE7. I want to turn off home and back button so no one can leave the application. I have found many answers, but none refers to Delphi.
How can I achieve this in Delphi? What objects should I use? Which units I need to include?
From documentation
Using the Android Device's Back Button
To make your application handle when users press the Back button on their Android device, add an event handler to your form for OnKeyUp, and use the following code within your event handler: In Delphi:
if Key = vkHardwareBack then
begin
// Do whatever you want to do here
Key := 0; // Set Key = 0 if you want to prevent the default action
end;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With