AppFunctionUriGrant
@AppFunctionSerializable
class AppFunctionUriGrant
Represents a Uri for which temporary access permission is to be granted to the caller of an AppFunction execution.
This class encapsulates a uri along with the specific access modeFlags (e.g., FLAG_GRANT_READ_URI_PERMISSION) that define the type of temporary access to be granted for that URI.
Using this class in the ExecuteAppFunctionResponse.Success.returnValue is equivalent to calling Context.grantUriPermission for the agent that is executing the function.
To succeed, the content provider owning the Uri must have set the grantUriPermissions attribute in its manifest or included the <grant-uri-permissions> tag.
| See also | |
|---|---|
returnValue |
|
FLAG_GRANT_READ_URI_PERMISSION |
|
FLAG_GRANT_WRITE_URI_PERMISSION |
|
FLAG_GRANT_PREFIX_URI_PERMISSION |
|
FLAG_GRANT_PERSISTABLE_URI_PERMISSION |
Summary
Public constructors |
|---|
AppFunctionUriGrant(uri: Uri, modeFlags: Int) |
Public constructors
Public functions
Public properties
modeFlags
val modeFlags: Int
The access mode flags.
This value must include at least one of FLAG_GRANT_READ_URI_PERMISSION or FLAG_GRANT_WRITE_URI_PERMISSION. It may optionally also include FLAG_GRANT_PREFIX_URI_PERMISSION or FLAG_GRANT_PERSISTABLE_URI_PERMISSION.