Jump to content

Android "Back Button" is closing mobile web application


mxnoname

Recommended Posts

I'm tring UniGUI for mobile on android and work fine with desktop shortcut.

When I open on desktop shortcut, address bar invisible and work like an native application. It's so good for me.

But when I click phone's "Back Button" web application is closing.

After close when I click shortcut again a new session is starting.

I need no close with phone's back button.

Is any solution for back button on android.

Link to comment
Share on other sites

Hello uzuner

 

I solved this problem by creating an application in firemonkey with a TWebBrowser accessing my unigui app.
 
In Firemoneky you use the following command:
 
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;

Handler OnKeyUp

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...