Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specify an activity back from native WiFi settings screen

Tags:

android

In my particular case, the application is intended to be running in an embedded system where the application flow is handled by the app itself and the android navigation bar is disabled (no hardware buttons either).

At some point, I have to provide the settings of the WiFi to connect and I wanted to invoke the native settings screens. However, I found in troubles to come back to my app after the settings are done.

I realized there is a software button enabled in the title bar only when you arrive to that screen from the parent settings menu. Is there any chance to specify the activity back from my app?

enter image description here

like image 651
Michael Knight Avatar asked Dec 05 '25 04:12

Michael Knight


1 Answers

Try to call Wi-Fi setting from your app using this code:

startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS)
        .putExtra("extra_prefs_show_button_bar", true)
        .putExtra("extra_prefs_set_back_text", "Back to the app!")
        .putExtra("extra_prefs_set_next_text", ""));
like image 148
Nikolay Avatar answered Dec 06 '25 21:12

Nikolay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!