Enable Android Back Button Functionality in Power Apps

Introduction

One of the primary design considerations to be considered while building the mobile power app is how the users interact with the App. In this article, we will see a classic design issue related to the back button that we need to keep in mind while building Mobile Apps.

When we are building an app that has multiple screens where which we are using to accept inputs from users, it is common to have the back button so that the users can use it to navigate back to the previous screen to make some changes to the content. To facilitate this, we can use an Icon and add the Back function to go back to the previous screen.

Say for instance we have an App with the below Home Screen

Graphical user interface, website

Description automatically generated

Clicking on the Incoming Stock will take us to the second screen where we can add the stock details.

Graphical user interface

Description automatically generated

Here we have added a back button with the formula Back (<Transition Effect>) which will take us to the previous screen

Graphical user interface, application

Description automatically generated

Problem Statement

However, while working with an Android Mobile, it’s quite common for the users to use the bottom back button of the Android UI to perform a back operation. This will result in invoking the Android exit operation from the app instead of navigating back to the previous screen.

Graphical user interface, application, Teams

Description automatically generated

Though clicking on the Android back button will give us the below prompt before exit, many users have complained that they lost the entire data they had entered in the forms when they tried navigating to the back screen using the Android back button which eventually exited the app.

Resolution

To workaround, we can leverage an experimental feature in Power App that will let us tap into the Android Back button to implement the App backward navigation functionality. To use this, head over to the Settings of the App by going to File ->Settings-> Upcoming features->Experimental and Turn on Android back button

Graphical user interface, application

Description automatically generated

We will also enable the Back enabled property of the App to On

Graphical user interface, application

Description automatically generated

Test the Android Back Button

Let’s go ahead and publish the changes and try to open the app on Android Mobile. We will Navigate from the Home screen to the Incoming stock view. Now, let’s click the back button.

Graphical user interface

Description automatically generated

Instead of exiting the app, it has taken us back to the previous home screen

Graphical user interface

Description automatically generated

Summary

Thus we saw how to enable the Android back button for navigating to previous screens in the Power App.

Related Articles

Author

Author

Priyaranjan KS is a Modern Workplace Architect primarily focused on developing and architecting solutions around Office 365,Power Platform and Azure.He is also a Microsoft Most Valuable Professional(MVP) and a Microsoft Certified Trainer(MCT)

Latest Articles