0

Hiii, I currently working on an application that requires change: brightness, bluetooth, wifi. This application works fine on Android 4.4 But with new versions she jumps because the user did not grant permission for the change of connections, brightness ...

Here in picture what I would like to do:

enter image description here

I Have this idea for Bluetooth, but it's not complete...

Intent discoverableIntent = new
Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);
startActivity(discoverableIntent);
  • Have you [read the documentation](https://developer.android.com/training/permissions/requesting.html)? – Bryan Herbst Oct 12 '16 at 16:26
  • Yes, but i'm not English/American it's very hard to understant it... –  Oct 12 '16 at 16:30
  • The documentation is also available in a number of other languages. Scroll all the way down and click the dropdown in the lower right corner to see if a language you know better is available. Answers here tend to also be in English, so you are unlikely to find a more understandable answer here. – Bryan Herbst Oct 12 '16 at 16:49
  • Not in French. Yes but i've give a code for example –  Oct 12 '16 at 16:57
  • If you are using Intent and startActivity, you don't need to take care of permissions. The app you requested to run will handle it for you. On the other hand, if you want to know how to request for multiple permissions, here is a sample code: http://stackoverflow.com/questions/39810434/android-api-23-requesting-multiple-permissions/40088998#40088998 – user1506104 Oct 18 '16 at 04:53

0 Answers0