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. However, FLAG_GRANT_PERSISTABLE_URI_PERMISSION is not allowed as only temporary access can be granted.

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.

Summary

Public constructors

AppFunctionUriGrant(uri: Uri, modeFlags: Int)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

Int

The access mode flags.

Uri

The Uri to be granted.

Public constructors

AppFunctionUriGrant

Added in 1.0.0-alpha03
AppFunctionUriGrant(uri: Uri, modeFlags: Int)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

modeFlags

Added in 1.0.0-alpha03
val modeFlagsInt

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.

uri

Added in 1.0.0-alpha03
val uriUri

The Uri to be granted.