Android.Media.MediaPlayer.SetWakeMode Method
Set the low-level power management behavior for this MediaPlayer.

Syntax

[Android.Runtime.Register("setWakeMode", "(Landroid/content/Context;I)V", "GetSetWakeMode_Landroid_content_Context_IHandler")]
public virtual void SetWakeMode (Android.Content.Context context, [Android.Runtime.GeneratedEnum] Android.OS.WakeLockFlags mode)

See Also

Android.OS.PowerManager

Parameters

context
the Context to use
mode
the power/wake mode to set

Remarks

Set the low-level power management behavior for this MediaPlayer. This can be used when the MediaPlayer is not playing through a SurfaceHolder set with MediaPlayer.SetDisplay(Android.Views.ISurfaceHolder) and thus can use the high-level MediaPlayer.SetScreenOnWhilePlaying(bool) feature.

This function has the MediaPlayer access the low-level power manager service to control the device's power usage while playing is occurring. The parameter is a combination of Android.OS.PowerManager wake flags. Use of this method requires NoType:android/Manifest$permission;Href=../../../reference/android/Manifest.permission.html#WAKE_LOCK permission. By default, no attempt is made to keep the device awake during playback.

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1