Is there any appropied way to close an Android application? I figured out how to intercept the Back button and start a dialog so user should ask if wants to leave, but just using Halt(0) it will terminate (app.terminate, close and other not working).

Is there any appropied way to close an Android application? I figured out how to intercept the Back button and start a dialog so user should ask if wants to leave, but just using Halt(0) it will terminate (app.terminate, close and other not working).

The problem above is that Delphi hang so I need to click cancel. If I allow my app to close using the Home button Delphi sees that and finish debuging fine.

Comments

  1. We just discussed that same issue here:
    https://plus.google.com/u/0/112235727026914021225/posts/dozZEM1c2CN

    The trick seems to be to call SharedActivity.finish; from the FMX.Helpers.Android unit. That way, the app finishes more-or-less properly, without hanging or crashing.

    ReplyDelete
  2. Thank you very much, gonna read that

    ReplyDelete

Post a Comment