To maintain security for the system and users, Android requires apps to request permission before the apps can use certain system data and features. Depending on how sensitive the area is, the system may grant the permission automatically, or it may ask the user to approve the request.
if(Build.VERSION.SDK_VERSION>=23)
{
checkselfPermission(Manifest.Permission.READ_External_Storage)
!=PackageManager.PERMISSION_GRANTED}
{String[]S={Manifest.permission.READ_EXTErNAL_STORAGE};
else{
}
}else
onRequestPermissionResult(int ReqCode,String[]perm,int[]res){
if(res.length>0)
{
if(res[0]==package.Manager>permission_granted);
}
proceed()};
else{
}
Comments
Post a Comment