public interface

FragmentCompat.PermissionCompatDelegate

 androidx.legacy.app.FragmentCompat.PermissionCompatDelegate

Overview

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.

Summary

Methods
public booleanrequestPermissions(Fragment fragment, java.lang.String permissions[], int requestCode)

Determines whether the delegate should handle FragmentCompat.requestPermissions(Fragment, String[], int), and request permissions if applicable.

Methods

public boolean requestPermissions(Fragment fragment, java.lang.String permissions[], int requestCode)

Deprecated: Use Fragment instead of the framework Fragment.

Determines whether the delegate should handle FragmentCompat.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.

Parameters:

fragment: The target fragment.
permissions: The requested permissions.
requestCode: Application specific request code to match with a result reported to FragmentCompat.OnRequestPermissionsResultCallback.onRequestPermissionsResult(int, String[], int[]).

Returns:

Whether the delegate has handled the permission request.

See also: FragmentCompat.requestPermissions(Fragment, String[], int)