C

AndroidBroadcastTransmitter QML Type

Used for sending intents. More...

Import Statement: import QtAndroidAutomotive.Base
Since: QtAndroidAutomotive 6.5

Properties

Methods

Detailed Description

This class can be used to send intents via send() and androidIntentInfo.

Here is a simple example of how this class may be used to send an intent with a specific action and some extras that contain the text from a QML TextField under the "data" key:

AndroidBroadcastTransmitter {
    id: transmitter

    intent {
        extras: {
            "storytext": "The quick brown fox jumps over the lazy dog"
        }
        action: "ACTION_SEND_STORY"
        data: "content://com.qt.story/story"
    }
}

After this, it's a simple matter of calling send() when necessary to send the intent.

See also AndroidBroadcastReceiver.

Property Documentation

This property holds the intent held by this AndroidBroadcastTransmitter.


receiverPermission : QString

This property holds the optional permission required in order to receive this broadcast.


Method Documentation

void send()

Sends a broadcast with the intent and receiver permissions held by this AndroidBroadcastTransmitter.


Available under certain Qt licenses.
Find out more.