Activity.Dump(String, FileDescriptor, PrintWriter, String[]) 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.
Print the Activity's state into the given stream.
[Android.Runtime.Register("dump", "(Ljava/lang/String;Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V", "GetDump_Ljava_lang_String_Ljava_io_FileDescriptor_Ljava_io_PrintWriter_arrayLjava_lang_String_Handler")]
public virtual void Dump(string prefix, Java.IO.FileDescriptor? fd, Java.IO.PrintWriter writer, string[]? args);
[<Android.Runtime.Register("dump", "(Ljava/lang/String;Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V", "GetDump_Ljava_lang_String_Ljava_io_FileDescriptor_Ljava_io_PrintWriter_arrayLjava_lang_String_Handler")>]
abstract member Dump : string * Java.IO.FileDescriptor * Java.IO.PrintWriter * string[] -> unit
override this.Dump : string * Java.IO.FileDescriptor * Java.IO.PrintWriter * string[] -> unit
Parameters
- prefix
- String
String: Desired prefix to prepend at each line of output. This value cannot be null.
FileDescriptor: The raw file descriptor that the dump is being sent to. This value may be null.
- writer
- PrintWriter
PrintWriter: The PrintWriter to which you should dump your state. This will be closed for you after you return. This value cannot be null.
- args
- String[]
String: additional arguments to the dump request. This value may be null.
- Attributes
Remarks
Print the Activity's state into the given stream. This gets invoked if you run adb shell dumpsys activity <activity_component_name>. This method won't be called if the app targets Build.VERSION_CODES.TIRAMISU or later if the dump request starts with one of the following arguments: --autofill --contentcapture --translation --list-dumpables --dump-dumpable
Android reference for android.app.Activity.dump.
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.