# FragmentCompat.PermissionCompatDelegate

added in[version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-v13:28.0.0-alpha1  
Deprecated since version 27.1.0  

# FragmentCompat.PermissionCompatDelegate

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public
static


interface
FragmentCompat.PermissionCompatDelegate
`  
`


`

|-----------------------------------------------------------------|
| android.support.v13.app.FragmentCompat.PermissionCompatDelegate |

<br />

*** ** * ** ***

<br />

**This interface was deprecated in API level 27.1.0.**   
Use[Fragment](https://developer.android.com/reference/android/support/v4/app/Fragment)instead of the framework[Fragment](https://developer.android.com/reference/android/app/Fragment.html).

Customizable delegate that allows delegating permission related compatibility methods to a custom implementation.

To delegate fragment compatibility methods to a custom class, implement this interface, and call`FragmentCompat.setPermissionCompatDelegate(delegate);`. All future calls to the compatibility methods in this class will first check whether the delegate can handle the method call, and invoke the corresponding method if it can.

<br />

## Summary

|                                                                                                                                                                                                                                                                                             ### Public methods                                                                                                                                                                                                                                                                                             ||
|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract boolean` | ` `[requestPermissions](https://developer.android.com/reference/android/support/v13/app/FragmentCompat.PermissionCompatDelegate#requestPermissions(android.app.Fragment, java.lang.String[], int))`(`[Fragment](https://developer.android.com/reference/android/app/Fragment.html)` fragment, String[] permissions, int requestCode) ` *This method was deprecated in API level 27.1.0. Use[Fragment](https://developer.android.com/reference/android/support/v4/app/Fragment)instead of the framework[Fragment](https://developer.android.com/reference/android/app/Fragment.html).* |

## Public methods

### requestPermissions

added in[version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean requestPermissions (Fragment fragment, 
                String[] permissions, 
                int requestCode)
```

<br />

**This method was deprecated in API level 27.1.0.**   
Use[Fragment](https://developer.android.com/reference/android/support/v4/app/Fragment)instead of the framework[Fragment](https://developer.android.com/reference/android/app/Fragment.html).

Determines whether the delegate should handle[requestPermissions(Fragment, String[], int)](https://developer.android.com/reference/android/support/v13/app/FragmentCompat#requestPermissions(android.app.Fragment, java.lang.String[], int)), and request permissions if applicable. If this method returns true, it means that permission request is successfully handled by the delegate, and platform should not perform any further requests for permission.

<br />

|                                                                                                                                                             Parameters                                                                                                                                                             ||
|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `fragment`    | `Fragment`: The target fragment. <br />                                                                                                                                                                                                                                                                             |
| `permissions` | `String`: The requested permissions. <br />                                                                                                                                                                                                                                                                         |
| `requestCode` | `int`: Application specific request code to match with a result reported to[onRequestPermissionsResult(int, String[], int[])](https://developer.android.com/reference/android/support/v13/app/FragmentCompat.OnRequestPermissionsResultCallback#onRequestPermissionsResult(int, java.lang.String[], int[])). <br /> |

|                                  Returns                                   ||
|-----------|-----------------------------------------------------------------|
| `boolean` | Whether the delegate has handled the permission request. <br /> |

**See also:**

- [requestPermissions(Fragment, String[], int)](https://developer.android.com/reference/android/support/v13/app/FragmentCompat#requestPermissions(android.app.Fragment, java.lang.String[], int))  
-

  ## Interfaces

  - [FragmentCompat.OnRequestPermissionsResultCallback](https://developer.android.com/reference/android/support/v13/app/FragmentCompat.OnRequestPermissionsResultCallback)
  - [FragmentCompat.PermissionCompatDelegate](https://developer.android.com/reference/android/support/v13/app/FragmentCompat.PermissionCompatDelegate)
-

  ## Classes

  - [ActivityCompat](https://developer.android.com/reference/android/support/v13/app/ActivityCompat)
  - [FragmentCompat](https://developer.android.com/reference/android/support/v13/app/FragmentCompat)
  - [FragmentPagerAdapter](https://developer.android.com/reference/android/support/v13/app/FragmentPagerAdapter)
  - [FragmentStatePagerAdapter](https://developer.android.com/reference/android/support/v13/app/FragmentStatePagerAdapter)
  - [FragmentTabHost](https://developer.android.com/reference/android/support/v13/app/FragmentTabHost)