cancel
Showing results for 
Search instead for 
Did you mean: 

SUP HWC: Physical back button (hard key) issue in android

former_member185875
Contributor
0 Kudos

Hi All,

I did a SUP hwc application, and it's working end-to-end fine in iphone.

But problem with Physical back button (hard key) in android device.

Scenario:


Suppose In HWC application, I navigate through screens   A --> B--> C(Create screen)--> D(success screen of C)

Now I am in screen D,

suppose now if I press on Physical back button (hard key) in android device I can see Screen C.

                        if I use MenuItem back button, I will navigate to screen A( which is correct according to our scenario)

It's a big problem in end user perspective.

is there any option to disable the physical back button (hard key) in android device?

Thanks in advance,

Lakshman Balanagu.

Accepted Solutions (1)

Accepted Solutions (1)

Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Kudos

The following two methods may be of some help.

In Custom.js there is a method called customBeforeNavigateBackward.  It allows you to return false if you do not wish the navigation to proceed.

The other method to take a look at would be customBeforeMenuItemClick.

Let me know if that doesn't work.

Dan van Leeuwen

former_member185875
Contributor
0 Kudos

Thanks Daniel,

Now I am returning false then backward screen transition is not happening

function customBeforeNavigateBackward(screenKey, isCancelled) {

    return false;

}

Answers (0)