• Public
  • Public/Protected
  • All

Interface IntentOptionsWithRoot

Intent options that allow the use of the root permission. Intent options are used to build an Intent to start an Activity or send a broadcast.

For more information about Intents, see Intent.








Optional action

action: string

Set the general action to be performed, such as "android.intent.action.SEND". When the action starts with "android.intent.action", you can omit the prefix and use "SEND" instead. See Actions.

Optional category

category: string | string[]

The category of this Intent. See Categories

Optional className

className: string

Target component class name, such as the class name of activity, service or broadcast.

Optional data

data: string | Uri

Set the data this intent is operating on, e.g. "https://www.google.com", "file://sdcard/1.txt".

Note: scheme matching in the Android framework is case-sensitive, unlike the formal RFC. As a result, you should always write your Uri with a lower case scheme, or use Uri#normalizeScheme or setDataAndNormalize(Uri) to ensure that the scheme is converted to lower case.

Optional extras

extras: any

The Extras(extra information) of this Intent. Provide extra information for this Intent, such as the title of the email when sending an email. See Extras.

Optional flags

flags: (string | number)[]

The flags of the intent, an array of strings or numbers, e.g. ["activity_new_task", "grant_read_uri_permission"]. See Flags. Set special flags controlling how this intent is handled. Most values here depend on the type of component being executed by the Intent, specifically the FLAG_ACTIVITY_* flags are all for use with Context.startActivity() and the FLAG_RECEIVER_* flags are all for use with Context.sendBroadcast().

Optional packageName

packageName: string

The package name of the component to start. If null, all components are considered.

Optional root

root: boolean

Whether to use the root permission to start the service, activity, etc.

Optional type

type: string

Set an explicit MIME data type. This is used to create intents that only specify a type and not data, for example to indicate the type of data to return.

Note: MIME type matching in the Android framework is case-sensitive, unlike formal RFC MIME types. As a result, you should always write your MIME types with lower case letters, or use normalizeMimeType(String) or setTypeAndNormalize(String) to ensure that it is converted to lower case.