A decision block that start an app activity.
The fiber will pause until the activity has finished or the timeout expired. If you don’t want the fiber to pause, use the App start block instead.
Only some app activities are designed to return a meaningful result, those activities often perform a single task, like picking, inserting or deleting content.
An app activity is referred, either explicitly by its package and activity class, e.g. by using the Pick activity button, or implicitly by an action and data URI. Explicit start is seldom needed and should be avoided as it will stop working if the activity class is renamed. To implicitly start the “main” activity like the launcher does, specify only the package.
What data, actions and extras an activity support varies. Search for public documentation, or look at the app manifest for clues. Information about common Intents.
When including a file URI either as data URI or
"android.intent.extra.STREAM"
extra,
ensure to enable the appropriate Grant flags otherwise it may be inaccessible to the app.
Note! If this block cause a ActivityNotFoundException
, SecurityException
or otherwise fail it’s likely because the activity isn’t exported,
it’s been temporarily or permanently disabled, or it’s secured by a permission to prevent third-party apps from launching it.
The list below describe some universal or more notable actions:
*List
conversion types.The table below lists some of the commonly used keys for the extras dictionary:
Key | Conversion type | Description |
---|---|---|
"android.intent.extra.HTML_TEXT" | String | A HTML alternative to "android.intent.extra.TEXT" . |
"android.intent.extra.REFERRER" | Uri | HTTP or package referrer. |
"android.intent.extra.STREAM" | Uri | A data stream, e.g. a file URI. |
"android.intent.extra.SUBJECT" | String | Subject of a message. |
"android.intent.extra.TEXT" | CharSequence | A generic text. |
"android.intent.extra.TITLE" | CharSequence | A generic title. |
"query" | String | A search query. |
Key | Conversion type | Description |
---|---|---|
"android:activity.animType" | Int | Value as 7 will launch activity “behind”, without presenting it to user so it’s only accessible through “recents” screen, requires New document flag (Android 4.4+) |
"android:activity.launchBounds" | Rect | The [left,top,right,bottom] bounds (window size) that the activity should be launched in (Android 7+) |
"android.activity.launchDisplayId" | Int | Display id the activity should be launched into (Android 8+) |
"android:activity.lockTaskMode" | Boolean | Whether the activity should be launched into “LockTask” mode (Android 9+) |