Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 1.0.0
belongs to Maven artifact androidx.legacy:legacy-support-v13:1.0.0-rc01
Deprecated since version 1.0.0

FragmentCompat.PermissionCompatDelegate

public static interface FragmentCompat.PermissionCompatDelegate

androidx.legacy.app.FragmentCompat.PermissionCompatDelegate


This interface was deprecated in API level 1.0.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.

Summary

Public methods

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

This method was deprecated in API level 1.0.0. Use Fragment instead of the framework Fragment.

Public methods

requestPermissions

added in version 1.0.0
public abstract boolean requestPermissions (Fragment fragment, 
                String[] permissions, 
                int requestCode)

This method was deprecated in API level 1.0.0.
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 Fragment: The target fragment.

permissions String: The requested permissions.

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

Returns
boolean Whether the delegate has handled the permission request.