I know that to open up the Bluetooth settings programmatically.
I do something like this:
Intent intentOpenBluetoothSettings = new Intent();
intentOpenBluetoothSettings.setAction(android.provider.Settings.ACTION_BLUETOOTH_SETTINGS);
startActivity(intentOpenBluetoothSettings);
But doing so will take me to the Bluetooth settings page in the same view/application.
How should I go about if I want the Bluetooth settings page to open up in another view/window/page, outside the application?.
The reason why I want this to be done is so that the user will not confuse the settings page and my app.
Thanks.
Update
I tried doing intentOpenBluetoothSettings.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
But no luck in getting it to open in another view.
There are two ways of requesting for enabling Bluetooth:
intentOpenBluetoothSettings.setAction(android.provider.Settings.ACTION_BLUETOOTH_SETTINGS);
or
intentOpenBluetoothSettings.setAction(BluetoothAdapter.ACTION_REQUEST_ENABLE);
If none of them suit your needs, then you might rethink your idea.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With