ActionRequest
class ActionRequest : Parcelable
| kotlin.Any | |
| ↳ | android.companion.ActionRequest |
Represents a request for a companion app to perform a specific action.
Summary
| Nested classes | |
|---|---|
|
A builder for creating |
|
| Constants | |
|---|---|
| static Int |
An operation to request that the action be activated. |
| static Int |
An operation to request that the action be deactivated. |
| static Int |
An action that signals a request for the companion app to change its nearby advertising state. |
| static Int |
An action that signals a request for the companion app to change its nearby scanning state. |
| static Int |
An action that signals a request for the companion app to attach or detach its system data transport. |
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Int | |
| Boolean | |
| Int | |
| Int | |
| Int |
hashCode() |
| String |
toString() |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<ActionRequest!> | |
Constants
OP_ACTIVATE
static val OP_ACTIVATE: Int
An operation to request that the action be activated.
Value: 0OP_DEACTIVATE
static val OP_DEACTIVATE: Int
An operation to request that the action be deactivated.
Value: 1REQUEST_NEARBY_ADVERTISING
static val REQUEST_NEARBY_ADVERTISING: Int
An action that signals a request for the companion app to change its nearby advertising state.
When the system sends this request, the app receives a callback to CompanionDeviceService.onActionRequested(AssociationInfo,ActionRequest) with this constant.
Value: 1REQUEST_NEARBY_SCANNING
static val REQUEST_NEARBY_SCANNING: Int
An action that signals a request for the companion app to change its nearby scanning state.
When the system sends this request, the app receives a callback to CompanionDeviceService.onActionRequested(AssociationInfo,ActionRequest) with this constant.
Value: 0REQUEST_TRANSPORT
static val REQUEST_TRANSPORT: Int
An action that signals a request for the companion app to attach or detach its system data transport.
When the system sends this request, the app receives a callback to CompanionDeviceService.onActionRequested(AssociationInfo,ActionRequest) with this constant.
Value: 2Public methods
describeContents
fun describeContents(): Int
getAction
fun getAction(): Int
| Return | |
|---|---|
Int |
The action being requested, such as REQUEST_NEARBY_SCANNING. Value is one of the following: |
getOperation
fun getOperation(): Int
| Return | |
|---|---|
Int |
The operation to perform, either OP_ACTIVATE or OP_DEACTIVATE. Value is one of the following: |
hashCode
fun hashCode(): Int
toString
fun toString(): String
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: This value cannot be null. |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of the following:
|
Properties
CREATOR
static val CREATOR: Parcelable.Creator<ActionRequest!>