Share via


Enable Android Back Button Functionality in Power Apps

  • Introduction
  • Problem Statement
  • Resolution
  • Test the Android Back Button
  • Summary

 

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 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

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

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

Problem Statement

However, while working with an Android Mobile, its 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.

Though clicking on 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 work around, 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

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

Test the Android Back Button

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

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

Summary

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