How to disable android home and back button from Delphi

I am writing an android tablet application in Delphi XE7. I want to disable the home and back buttons so that no one can submit a request. I found many answers, but none are Delphi specific.

How can I achieve this in Delphi? What objects should I use? What units do I need to include?

+3


source to share


1 answer


From documentation

Using the Android Back Button

To make the application handle when users click the Back button on their Android device, add an event handler to your form for OnKeyUp, and use the following code in 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;

      

+6


source







All Articles