Activity.SetRecentsScreenshotEnabled(Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
If set to false, this indicates to the system that it should never take a screenshot of the activity to be used as a representation in recents screen.
[Android.Runtime.Register("setRecentsScreenshotEnabled", "(Z)V", "GetSetRecentsScreenshotEnabled_ZHandler", ApiSince=33)]
public virtual void SetRecentsScreenshotEnabled(bool enabled);
[<Android.Runtime.Register("setRecentsScreenshotEnabled", "(Z)V", "GetSetRecentsScreenshotEnabled_ZHandler", ApiSince=33)>]
abstract member SetRecentsScreenshotEnabled : bool -> unit
override this.SetRecentsScreenshotEnabled : bool -> unit
Parameters
- enabled
- Boolean
boolean: true to enable recents screenshots; false otherwise.
- Attributes
Remarks
If set to false, this indicates to the system that it should never take a screenshot of the activity to be used as a representation in recents screen. By default, this value is true. Note that the system may use the window background of the theme instead to represent the window when it is not running. Also note that in comparison to WindowManager.LayoutParams.FLAG_SECURE, this only affects the behavior when the activity's screenshot would be used as a representation when the activity is not in a started state, i.e. in Overview. The system may still take screenshots of the activity in other contexts; for example, when the user takes a screenshot of the entire screen, or when the active VoiceInteractionService requests a screenshot via VoiceInteractionSession.SHOW_WITH_SCREENSHOT.
Android reference for android.app.Activity.setRecentsScreenshotEnabled.
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.