public static void launchPermissionSettings ( Activity activity ) { Intent intent = new Intent ( ) ; intent . setAction ( Settings . ACTION_APPLICATION_DETAILS_SETTINGS ) ; intent . setData ( Uri . fromParts ( "package" , activity . getPackageName ( ) , null ) ) ; activity . startActivity ( intent ) ; }
Launch Application Setting to grant permission .