Android.Media.MediaPlayer.SetScreenOnWhilePlaying Method
Control whether we should use the attached SurfaceHolder to keep the screen on while video playback is occurring.

Syntax

[Android.Runtime.Register("setScreenOnWhilePlaying", "(Z)V", "GetSetScreenOnWhilePlaying_ZHandler")]
public virtual void SetScreenOnWhilePlaying (bool screenOn)

Parameters

screenOn
Supply true to keep the screen on, false to allow it to turn off.

Remarks

Control whether we should use the attached SurfaceHolder to keep the screen on while video playback is occurring. This is the preferred method over MediaPlayer.SetWakeMode(Android.Content.Context, Android.OS.WakeLockFlags) where possible, since it doesn't require that the application have permission for low-level wake lock access.

[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