App Engagement is a crucial metric that can provide insights into the success of an application and achieving this is a challenging task. One way of addressing this would be enabling the user to focus on the app rather than what the app demands. Settings Panel API is one way of ensuring user-engagement by making sure the user doesn’t lose focus while interacting with the app.

Settings Panel was introduced in API level 29 (Android Q) and it allows us to show a UI panel on top of our app without navigating away. The floating UI shows frequently used settings within the app so that the user does not have to leave app context in order to toggle these settings. Thus, keeping the user in the same app window and reducing app minimization.

This benefits the app with a better UX design by allowing the user to perform actions quickly and efficiently

There are 4 different types of settings available to the user depending upon the use-case

  1. Internet Connectivity Settings
  2. Volume Settings
  3. NFC Settings
  4. Wi-Fi Settings

Let’s go through each one of them to understand how we can implement them

1. Internet Connectivity Settings

Image for post

Internet Connectivity Settings Panel

This panel enables the user to toggle internet connectivity settings like Wifi, Mobile data, and airplane mode.

Settings.Panel._ACTION_INTERNET_CONNECTIVITY_is passed in the Intent in order to display this panel on top of the calling app. The final piece of code looks something like this:

startActivity(Intent(Settings.Panel.ACTION_INTERNET_CONNECTIVITY))

Generally, in case of a poor or inactive data connection, an alert is shown to the user with an option to retry the network call. This could be in the form of an alert dialog or a separate DialogFragment depending on the app which is in use. Here, a secondary option to launch the settings panel can allow the user to switch to an active data connection without having to navigate away from the app, thus providing consistency for a good user experience.

#kotlin #android

Better UX with Settings Panel API on Android
1.30 GEEK