Prevent BackButton Android

Heey :smiley:
Is it Possible to prevent the system from going back when pressed the Hardware-Back-Button on Android?

I know, that I can start a Trigger on that like this:

          <Callback Handler="{onBackButtonPressed}" />

But it first makes “router.goBack()” and then my function: “onBackButtonPressed”.
I only want to fire my function and prevent the user from going back…

Could anyone help? :slight_smile:
Thanks! (=

I got a solution:
I changed this

<Router ux:Name="router" BackButtonAction="None"/>
So that there is no action onBackPressed … And then in my function “onBackButtonPressed” I take a look wich page I am and then router.goBack() or not :smiley:


1 Like

Good job @Stefan_13! :+1: