How to go to the Wifi settings page directly?

alexb

Member
Licensed User
Longtime User
I have some java code allowing to go directly to the wifi settings page:

intent settings = new Intent(Settings.ACTION_WIFI_SETTINGS);
settings.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
StartActivity(settings);

I have tried to convert it to B4A code but didn't succeed. Is it possible or can it not be done because ACTION_WIFI_SETTINGS is not supported but only a few actions (ACTION_CALL, ACTION_MAIN, ACTION_SEND, ACTION_EDIT, ACTION_PICK, ACTION_VIEW). Again I spent quite some time with different combinations of parameters but couldn't figure out the solution.

Anybody can provide a working code example?

Thank you!
 

alexb

Member
Licensed User
Longtime User
:)Wow, the answer came again with warp speed 10 and it works! Probably I would still sit and try in the 26th century looking for the flags value if you hadn't come up with the solution here (sure Captain Kirk would know too).

Agraham, any chance that you reveal how you got the flags value? In my previous 'desperate' testing I tried to query that flag value with some working intents but I only got '0'. Anyway from the documentation I couldn"t really figure out for what it was good.

THANK YOU!
 
Upvote 0
Top