This is very simple and easy to implement using Settings panel API available in Android Q.
Simple we need to trigger intent with one of the new Settings.Panel actions.
To open Internet Connectivity Panel:
Java:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
Intent panelIntent = new Intent(Settings.Panel.ACTION_INTERNET_CONNECTIVITY)
startActivityForResult(panelIntent, 545)
}
Kotlin:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
val panelIntent = Intent(Settings.Panel.ACTION_INTERNET_CONNECTIVITY)
startActivityForResult(panelIntent, 545)
}
To open Volume control panel:
Java:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
Intent panelIntent = new Intent(Settings.Panel.ACTION_VOLUME)
startActivityForResult(panelIntent, 545)
}
Kotlin:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
val panelIntent = Intent(Settings.Panel.ACTION_VOLUME)
startActivityForResult(panelIntent, 545)
}
To open WIFI panel:
Java:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
Intent panelIntent = new Intent(Settings.Panel.ACTION_WIFI)
startActivityForResult(panelIntent, 545)
}
Kotlin:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
val panelIntent = Intent(Settings.Panel.ACTION_WIFI)
startActivityForResult(panelIntent, 545)
}
To open NFC panel:
Java:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
Intent panelIntent = new Intent(Settings.Panel.ACTION_NFC)
startActivityForResult(panelIntent, 545)
}
Kotlin:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
val panelIntent = Intent(Settings.Panel.ACTION_NFC)
startActivityForResult(panelIntent, 545)
}
Here you can check more about settings panel from Android official doc:
1) https://developer.android.com/preview/features#settings-panels
2) https://developer.android.com/reference/android/provider/Settings.Panel
startActivityForResult
? – Pickar