it's my first question here and maybe i'll explain a little bad, but okay look: I have a project with its using api 22 library, but compiles with android 6.0(api 23), and i wanna continue with api 22 library, but when i run my project with android 6.0 device i have problems with the permissions...
My question: is there a way that you can work in, for example, Android 5.1.1 and compile with Android 6.0 with the necessary permission's methods? i mean, can i add some library, for use callback like onRequestPermissionsResult(...)
? i tried adding api 23 library to my project but isnt works his methods, any suggestion...??
1. Checkout if the permission you need is a dangerous permission at this page.
2. List all dangerous permissions you need in a
String
array like below.3. Add the following code to your onCreate().
REQUEST_PERMISSIONS
is a constant integer to identify this requesting.