See Also: UiModeManager
public class UiModeManager : Object
This class provides access to the system uimode services. These services allow applications to control UI modes of the device. It provides functionality to disable the car mode and it gives access to the night mode settings.
These facilities are built on top of the underlying Intent.ActionDockEvent broadcasts that are sent when the user physical places the device into and out of a dock. When that happens, the UiModeManager switches the system Configuration to the appropriate UI mode, sends broadcasts about the mode switch, and starts the corresponding mode activity if appropriate. See the broadcasts UiModeManager.ActionEnterCarMode and UiModeManager.ActionEnterDeskMode for more information.
In addition, the user may manually switch the system to car mode without physically being in a dock. While in car mode -- whether by manual action from the user or being physically placed in a dock -- a notification is displayed allowing the user to exit dock mode. Thus the dock mode represented here may be different than the current state of the underlying dock event broadcast.
You do not instantiate this class directly; instead, retrieve it through Context.GetSystemService(String).
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 8
The members of Android.App.UiModeManager are listed below.
See Also: Object
|DisableCarModeGoHome||DisableCarModeFlags (1). Flag for use with UiModeManager.DisableCarMode(DisableCarModeFlags): go to the normal home activity as part of the disable.|
|EnableCarModeAllowSleep||EnableCarModeFlags (2). Flag for use with UiModeManager.EnableCarMode(EnableCarModeFlags): allow sleep mode while in car mode.|
|EnableCarModeGoCarHome||EnableCarModeFlags (1). Flag for use with UiModeManager.EnableCarMode(EnableCarModeFlags): go to the car home activity as part of the enable.|
|ModeNightAuto||UiNightMode (0). Constant for UiModeManager.NightMode and UiModeManager.NightMode: automatically switch night mode on and off based on the time.|
|ModeNightNo||UiNightMode (1). Constant for UiModeManager.NightMode and UiModeManager.NightMode: never run in night mode.|
|ModeNightYes||UiNightMode (2). Constant for UiModeManager.NightMode and UiModeManager.NightMode: always run in night mode.|
|ActionEnterCarMode||String. 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.|
|ActionEnterDeskMode||String. Broadcast sent when the device's UI has switched to desk mode, by being placed in a desk dock.|
|ActionExitCarMode||String. Broadcast sent when the device's UI has switch away from car mode back to normal mode.|
|ActionExitDeskMode||String. Broadcast sent when the device's UI has switched away from desk mode back to normal mode.|
|[read-only]||CurrentModeType||UiMode. Return the current running mode type.|