Condividi tramite


UiModeManager.ActionEnterCarMode Property

Definition

Broadcast sent when the device's UI has switched to car mode, either by being placed in a car dock or explicit action of the user.

[Android.Runtime.Register("ACTION_ENTER_CAR_MODE")]
public static string? ActionEnterCarMode { get; set; }
[<Android.Runtime.Register("ACTION_ENTER_CAR_MODE")>]
static member ActionEnterCarMode : string with get, set

Property Value

Attributes

Remarks

Broadcast sent when the device's UI has switched to car mode, either by being placed in a car dock or explicit action of the user. After sending the broadcast, the system will start the intent android.content.Intent#ACTION_MAIN with category android.content.Intent#CATEGORY_CAR_DOCK to display the car UI, which typically what an application would implement to provide their own interface. However, applications can also monitor this Intent in order to be informed of mode changes or prevent the normal car UI from being displayed by setting the result of the broadcast to Activity#RESULT_CANCELED.

This intent is broadcast when #getCurrentModeType() transitions to Configuration#UI_MODE_TYPE_CAR from some other ui mode.

Java documentation for android.app.UiModeManager.ACTION_ENTER_CAR_MODE.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to