Original Author Paul Laughton, 2011
Page 199
De Re BASIC!
Su.close
Exits the Superuser mode.
App Commands
App.broadcast <action_sexp>, <data_uri_sexp>, <package_sexp>, <component_sexp>,
<mime_type_sexp>, <categories_sexp>, <extras_bptr_nexp>, <flags_nexp>
Creates a system message and broadcasts it to other applications on your device. The message is called
an Intent. The Intent will be received by any application that has the right Intent Filter.
All of the parameters are optional; use commas to indicate omitted parameters (see Optional
Parameters). See App.start, below, for parameter definitions.
If there is no app that can receive your broadcast, the broadcast is ignored. You can detect this condition
only by calling the GETERROR$() function. If an app is available to receive the broadcast, GETERROR$()
returns "No error".
App.start <action_sexp>, <data_uri_sexp>, <package_sexp>, <component_sexp>,
<mime_type_sexp>, <categories_sexp>, <extras_bptr_nexp>, <flags_nexp>
Sends a message to the system, called an Intent, requesting a specific application or type of application
to start. If more than one app can handle the request, the system puts up a chooser for you.
If there is no app that can handle the request, the Intent is ignored. You can detect this condition only by
calling the GETERROR$() function. If an app is available to launch, GETERROR$() returns "No error".
All of the parameters are optional. Use commas to indicate omitted parameters (see Optional
Parameters). You will almost never need to use all of the parameters in one command.
The first six parameters are string expressions: action, data URI, package name, component name, MIME
type, and a list of categories separated by commas (the commas are part of the string expression).
The last two parameters are numeric expressions. One is a pointer to a bundle that contains "extras"
that are attached to the message. The other is a single number representing one or more flag values.
For parameter values, consult the documentation of the Android system and the app you want to start.
Parameter
Meaning
am Command
Equivalent
action
An Action defined by Android or by the target application
-a
data URI
Data or path to data; BASIC! URI-encodes this string
-d
package name
Name of the target application's package (sometimes called ID)
-n [Note 2]
component name
Name of a component within the target application
-n [Note 2]
MIME type
MIME-type of the data, may be used without a data URI
-t
categories
Comma-separated list of Intent categories
-c [Note 3]
"extras" bundle ptr
Pointer to an existing bundle containing "extras" values
-e [Note 4]
flags
Sum of numeric values of one or more flags
-f