Advertisement
Sketchware

Abrir configurações de Wi-Fi

Jan 20th, 2023
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.32 KB | None | 0 0
  1. Button wifiButton = (Button) findViewById(R.id.wifi_button);
  2. wifiButton.setOnClickListener(new View.OnClickListener() {
  3.     @Override
  4.     public void onClick(View view) {
  5.         Intent openWifiSettings = new Intent(android.provider.Settings.ACTION_WIFI_SETTINGS);
  6.         startActivity(openWifiSettings);
  7.     }
  8. });
  9.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement