cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 : Back Button not working on Android Devices

Former Member
0 Kudos

Dear Experts,

We have developed a couple of UI5 Applications which is currently facing a specific issue with the Back Button in Android Devices.

When the user clicks on the Back Button(in the app not the Physical Back button of the Phone), the flow is not taking the user back to the Launchpad.

We tried both these statements on the back button event,

window.history.back();

(AND)

window.history.go(-1);

But still the issue persists.

The below statement is how I have activated the Back Button in the UI5 Page.

  <Page class="sapUiFioriObjectPage" id="idCreate" navButtonPress="handleNavBackToLPD" showNavButton="true"
    title="{i18n>title}">

Please let me know if any one has faced such issues and if you were able to resolve the same.

Thanks and Regards,

Jegadeesan U

Accepted Solutions (0)

Answers (4)

Answers (4)

Ajit_K_Panda
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Jegadeesan,

I am facing the same problem. How did you solve this?

Can you please provide the solutions for this.

Regards,

Ajit

suresu22
Explorer
0 Kudos

Hi Ajit,

following logic from should work.

handleNavButtonPress: function() {

  var oCrossAppNavigator = sap.ushell.Container.getService("CrossApplicationNavigation"); 

  oCrossAppNavigator.toExternal({ 

                       target: { semanticObject : "#"} 

                      });

  },

former_member182874
Active Contributor
0 Kudos

Hi,

How does it behave in Fiori client ? if it behaves the same, provide your Ui5 library version.

Regards,
Tejas

gill367
Active Contributor
0 Kudos

have you tried using the below code.

handleNavButtonPress: function() {

  var oCrossAppNavigator = sap.ushell.Container.getService("CrossApplicationNavigation"); 

  oCrossAppNavigator.toExternal({ 

                       target: { semanticObject : "#"} 

                      });

  },

Regards,

Sarbjeet Singh

saurabh_vakil
Active Contributor
0 Kudos

Do you mean that the back button works fine on desktop and does not work only on Android devices? On Android device are you accessing the apps via Fiori Client or browser? If via browser then which browser?

Have you checked the code given here - Step 33: Routing Back and History

Former Member
0 Kudos

Hi Saurabh,

Its using Airwatch Browser in Android Devices. In a Desktop browser we are not encountering this issue.

Thanks and Regards

Jegadeesan U

saurabh_vakil
Active Contributor
0 Kudos

Please check this page SAPUI5 SDK - Demo Kit for browser support. I don't think Airwatch browser on Android is listed anywhere as a supported browser. Have you tested on Google Chrome browser on Android?

Also please try the code mentioned by Sarbjeet.

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Jegadeesan

The SAP Notes to reference re browser support are https://service.sap.com/sap/support/notes/1716423 and http://service.sap.com/sap/support/notes/1935915

I suggest you also check with Airwatch themselves. No Airwatch is not a supported browser.

All browsers are in themselves software, and therefore can have their own ways of interpreting things... and their own software bugs.

If you are using Airwatch for Mobile Device Management you will need to contact them about the most appropriate way to access your SAPUI5 app.

I know yours is not the only customer using Airwatch. So perhaps they have already made similar recommendations to other customers. It's worth asking.

Rgds,

Jocelyn