Posts

Showing posts with the label Android Runtime Permission

Android Runtime Permission Example

In Android OS (Marshmallow on wards) , google introduced run time permissions to access Storage, Camera, Location etc.. Let see an example how to ask single permission in android Here is the Link for Dangerous permissions and permission groups. Step 1 : AndroidManifest.xml let us add storage and location permission in manifest file <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android= "http://schemas.android.com/apk/res/android" package= "org.pratap.runtimepermissions" > <!-- Permission for writing and reading SD Card --> <uses-permission android:name= "android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name= "android.permission.READ_EXTERNAL_STORAGE" /> <!-- Permission for accessing user's current location --> <uses-permission android:name= "android.permission.ACCESS_FINE_LOCATION" /...