Methods
-
<static> registerReceiver(action, broadcastReceivedCallback) → {siteKiosk.system.android.broadcast~receiver}
-
Registers a broadcast receiver.
Parameters:
Name Type Description actionstring An Android broadcast intent action string broadcastReceivedCallbacksiteKiosk.system.android.broadcast~receivedCallback A callback, to be invoked when the system received a broadcast Returns:
A broadcast receiver object, used to unsubscribe. -
<static> sendBroadcast(intent)
-
Broadcasts a specified Android intent.
Parameters:
Name Type Description intentsiteKiosk.system.android.broadcast~intent | string The Android intent to broadcast or the action of the intent
Type Definitions
-
intent
-
An Android intent
Type:
- Object
Properties:
Name Type Argument Description actionstring <optional>
The intent's action datastring <optional>
The intent's data URI categoriesArray.<string> <optional>
The intent's categories typestring <optional>
The intent's MIME type componentstring <optional>
The intent's flattened component name extrasArray.<siteKiosk.system.android.broadcast~intentExtra> <optional>
The intent's extras flagsnumber <optional>
The intent's integer flags -
intentExtra
-
An extra attached to an intent
Type:
- Object
Properties:
Name Type Description keystring The extra's key typestring The extra's type ("boolean" | "byte" | "char" | "short" | "int" | "float" | "double" | "string" | "charSequence") valuestring The extra's serialized value -
receivedCallback(extras)
-
This callback is invoked when the system received a broadcast.
Parameters:
Name Type Description extrasObject An object containing the extras of the event -
receiver
-
A broadcast receiver, which receives system events.
Type:
- Object
Properties:
Name Type Description removefunction A function to remove the broadcast receiver and unsubscribe the event