Hello. We all know how run time permissions came into effect from Android 6.0 ( Marshmallow ). The advantage is that it's more user friendly and it gives the user an idea about why he has to give such permissions for the app. Such as giving his contact details , his location details etc. But, even-though there is one flaw in it. Maybe exactly not a flaw, but we can't really customize that run-time permission dialog or it's contents. Android OS won't allow us to customize it's default settings in this case. So, the only option now remaining is to pop up a dialog just before the original run-time permission dialog. You can then describe to your user what exactly you are going to do by accessing such permissions. I have found many answers on StackOverflow and I combined those answers to my required one. What we are going to do today is asking the permission of user for accessing his location. Simply said, asking him to turn on his GPS. There is a method called che...
I blog about Android Development. About the things I encountered while at work. Hope to give it back to the community.