Getting Bluetooth settings. Connect and connect the screen using intention?

I want to go directly to bluetooth settings. Connect and set the pair button on the button. Now I can navigate to the wireless settings.

My code is as follows:

Intent i=new Intent(); i.setClassName("com.android.settings","com.android.settings.WirelessSettings"); startActivity(i); 
+4
source share
2 answers

It is pretty simple, try the following:

 Intent settingsIntent = new Intent(android.provider.Settings.ACTION_BLUETOOTH_SETTINGS); startActivity(settingsIntent); 
+15
source

Use the following:

  Intent settings_intent = new Intent(android.provider.Settings.ACTION_BLUETOOTH_SETTINGS); startActivityForResult(settings_intent, 0); 

This will open the Bluetooth settings page, and then return to your activity, which launched the intent.

+1
source

All Articles