In marshmallow how to handle the permission? How to avoid user interaction for requesting and handling permission. How to request and handle permission for location?
Asked
Active
Viewed 42 times
0
-
You cannot avoid requesting the permission on Marshmallow. Refer to this page: https://developer.android.com/training/permissions/requesting.html – Karakuri Feb 15 '16 at 21:37
-
Try this it may be work http://stackoverflow.com/a/41221852/5488468 – Bipin Bharti Jan 03 '17 at 10:52
1 Answers
0
In marshmallow for permission user interaction is required,you can ask for all required permission at the time of app launches. It will be only once but also make sure whenever you try to access location to check permission using ContextCompat.checkSelfPermission()
as user can revoke app permission anytime.

GaneshP
- 746
- 7
- 25
-
But in my project I want to send location automatically, how can I do this in marshmallow? – MS Sobi Feb 16 '16 at 02:19
-
Want to store the value of radio button into sqlite. In my project I have 3 radio buttons General Silent and vibrate, now I want to store the status of each radio button or radio button which has been selected into sqlite. – MS Sobi Feb 17 '16 at 20:06
-
If you just want to store selected radio button value i will suggest to use SharedPreference. e.g. http://android-er.blogspot.in/2013/02/sharedpreferenceseditor-for-radiobutton.html – GaneshP Feb 18 '16 at 07:11
-
But I want to store in sqlite database, where user may have multiple entries and may be one entry contain silent where as another contain general. Each time values may be different. Then how can I use sharedpreference to store multiple values in database – MS Sobi Feb 18 '16 at 12:05