Open In App

Settings Panels in Android

With the release of Android Q by Google, a slew of new features have emerged. Location Service use is one wonderful feature, among others. In this article, we will focus on three Settings choices in particular.

  1. Internet connectivity (particularly Wifi): It displays the settings panels for Mobile data, Wifi, Airplane mode, and so forth.
  2. NFC Connectivity: It displays the NFC settings screen.
  3. Volume Adjustment Options: It displays the Volume Adjustment Settings screen, which includes Call, Music, and the rest of the audio settings.

All three of the aforementioned settings are part of the Settings panel bundle. It enables the user to browse through the app’s settings. This was a much-needed feature to prevent users from exiting the program and going to the settings screen to do any activity. Let’s begin by setting the project in build.gradle using the following setup for Android Q:



android {
    compileSdkVersion 29
    defaultConfig {
        minSdkVersion 20
        targetSdkVersion 'Q'
    }
}

Let’s go through them one by one now.

1. Internet Connectivity

A single line of code is required to start the Configuration Panel for every given setting. To access the Internet Connectivity Configuration Panel:



startActivity(Intent(Settings.Panel.ACTION_INTERNET_CONNECTIVITY))

It will display a popup similar to the one below:

Image 1. Internet Connectivity

According to the aforementioned screen,

Here are a few use cases for having such a setting:

2. NFC Connectivity

If you wish to enable NFC in your phone, and your device supports NFC, we can start the NFC popup using,

startActivity(Intent(Settings.Panel.ACTION NFC, REQUEST CODE NFC), REQUEST CODE NFC))

Image 2. NFC Connectivity

According to the aforementioned screen,

3. Volume Adjustment Setting

 If you wish to manage Media, Alarm, Call, and Ring volume, you should utilize Android Q’s new volume settings.

startActivity(Intent(Settings.Panel.ACTION_VOLUME))

This will bring up the screen seen below.

Image 3. Volume Settings

Handling the volume of any media file is a typical use case for the aforementioned feature (eg: Listening to an audio file).

Conclusion

This is how we can experiment with Android Q’s Settings Panel. With this we end our hustle about learning what’s new in Android Settings, hope this article cleared the air about settings!

Article Tags :