This interface was deprecated
in API level 27.1.0.
Use Fragment instead of the framework
Fragment.
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.
boolean requestPermissions (Fragment fragment,
String[] permissions,
int requestCode)
This method was deprecated
in API level 27.1.0.
Use Fragment instead of the framework
Fragment.
Determines whether the delegate should handle
requestPermissions(Fragment, 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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# FragmentCompat.PermissionCompatDelegate\n\nadded in [version 27.1.0](/topic/libraries/support-library/revisions) \nbelongs to Maven artifact com.android.support:support-v13:28.0.0-alpha1 \nDeprecated since version 27.1.0 \n\nFragmentCompat.PermissionCompatDelegate\n=======================================\n\n| This package is part of the Android [support library](/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](/jetpack/androidx) which is part of [Jetpack](/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class\n| mappings](/jetpack/androidx/migrate/class-mappings).\n\n\n`\npublic\nstatic\n\n\ninterface\nFragmentCompat.PermissionCompatDelegate\n`\n\n\n`\n\n\n`\n\n|-----------------------------------------------------------------|\n| android.support.v13.app.FragmentCompat.PermissionCompatDelegate |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This interface was deprecated\nin API level 27.1.0.** \n\nUse [Fragment](/reference/android/support/v4/app/Fragment) instead of the framework\n[Fragment](https://developer.android.com/reference/android/app/Fragment.html).\n\nCustomizable delegate that allows delegating permission related compatibility methods\nto a custom implementation.\n\n\nTo delegate fragment compatibility methods to a custom class, implement this interface,\nand call `FragmentCompat.setPermissionCompatDelegate(delegate);`. All future calls\nto the compatibility methods in this class will first check whether the delegate can\nhandle the method call, and invoke the corresponding method if it can.\n\n\u003cbr /\u003e\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract boolean` | ` `[requestPermissions](/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](/reference/android/support/v4/app/Fragment) instead of the framework [Fragment](https://developer.android.com/reference/android/app/Fragment.html).* |\n\nPublic methods\n--------------\n\n### requestPermissions\n\nadded in [version 27.1.0](/topic/libraries/support-library/revisions) \n\n```\nboolean requestPermissions (Fragment fragment, \n String[] permissions, \n int requestCode)\n```\n\n\n**This method was deprecated\nin API level 27.1.0.** \n\nUse [Fragment](/reference/android/support/v4/app/Fragment) instead of the framework\n[Fragment](https://developer.android.com/reference/android/app/Fragment.html).\n\nDetermines whether the delegate should handle\n[requestPermissions(Fragment, String[], int)](/reference/android/support/v13/app/FragmentCompat#requestPermissions(android.app.Fragment, java.lang.String[], int)), and request\npermissions if applicable. If this method returns true, it means that permission\nrequest is successfully handled by the delegate, and platform should not perform any\nfurther requests for permission.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `fragment` | `Fragment`: The target fragment. \u003cbr /\u003e |\n| `permissions` | `String`: The requested permissions. \u003cbr /\u003e |\n| `requestCode` | `int`: Application specific request code to match with a result reported to [onRequestPermissionsResult(int, String[], int[])](/reference/android/support/v13/app/FragmentCompat.OnRequestPermissionsResultCallback#onRequestPermissionsResult(int, java.lang.String[], int[])). \u003cbr /\u003e |\n\n| Returns ||\n|-----------|-----------------------------------------------------------------|\n| `boolean` | Whether the delegate has handled the permission request. \u003cbr /\u003e |\n\n**See also:**\n\n- [requestPermissions(Fragment, String[], int)](/reference/android/support/v13/app/FragmentCompat#requestPermissions(android.app.Fragment, java.lang.String[], int)) \n-\n\n Interfaces\n ----------\n\n - [FragmentCompat.OnRequestPermissionsResultCallback](/reference/android/support/v13/app/FragmentCompat.OnRequestPermissionsResultCallback)\n - [FragmentCompat.PermissionCompatDelegate](/reference/android/support/v13/app/FragmentCompat.PermissionCompatDelegate)\n-\n\n Classes\n -------\n\n - [ActivityCompat](/reference/android/support/v13/app/ActivityCompat)\n - [FragmentCompat](/reference/android/support/v13/app/FragmentCompat)\n - [FragmentPagerAdapter](/reference/android/support/v13/app/FragmentPagerAdapter)\n - [FragmentStatePagerAdapter](/reference/android/support/v13/app/FragmentStatePagerAdapter)\n - [FragmentTabHost](/reference/android/support/v13/app/FragmentTabHost)"]]