Open settings from android app


I would like to add the option to configure the wifi network to an app before starting to operate with it, so I would need to open the settings from the application.

However, after several searches in google I have not found information. Therefore, I would like to know how to open the settings from my app or, failing that, how to set the wifi from the app itself.

asked by pepito 28.06.2017 в 08:37

1 answer


Opening WiFi options is quite simple, you just have to write the following line:

startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));

This way you can access from your application to all the configuration menus of the device, for example:

To access the airplane mode options you can add this line:

startActivity(new Intent(Settings.ACTION_AIRPLANE_MODE_SETTINGS));

Or to access the Bluetooth settings

startActivity(new Intent(Settings.ACTION_BLUETOOTH_SETTINGS));
answered by 28.06.2017 / 11:05