Recent

Author Topic: Back arrow in App -> first page on phone  (Read 372 times)

biologic

  • New Member
  • *
  • Posts: 28
Back arrow in App -> first page on phone
« on: November 05, 2025, 10:09:27 pm »
How can I go to the screen where the app icon is when I press
the back arrow? Now, pressing the back arrow takes me to
the phone's main screen.

Thank you.

dseligo

  • Hero Member
  • *****
  • Posts: 1618
Re: Back arrow in App -> first page on phone
« Reply #1 on: November 06, 2025, 01:04:58 am »
I had the same problem, but I can't replicate it now. I tried it with several LAMW apps on my phone (and 2 apps on another phone, where USB debugging is not enabled) but none returns to the home screen when pressing back arrow.
I also checked my LAMW notes, but I didn’t find anything related to this issue.

Sorry I couldn't be more helpful.

nicelybrewed

  • New Member
  • *
  • Posts: 26
Re: Back arrow in App -> first page on phone
« Reply #2 on: November 06, 2025, 08:17:10 am »
I think you need to use mute after your code to stop it doing that in the OnSpecialKeyDown event of your Form/Module.

Code: Pascal  [Select][+][-]
  1. procedure TAndroidModule1.AndroidModule1SpecialKeyDown(Sender: TObject; keyChar: char; keyCode: integer; keyCodeString: string; var mute: boolean);
  2. begin
  3.  if (KeycodeString = 'KEYCODE_BACK') then
  4.   begin
  5.    [Your code here]
  6.    mute := true;
  7.   end;
  8. end;
  9.  
« Last Edit: November 06, 2025, 08:20:02 am by nicelybrewed »
Lazarus v3.8, LAMW v0.8.6.4-blue, NDK v22b, Android 15, Windows 11 mainly but also use LAMW on Linux.

 

TinyPortal © 2005-2018