Udostępnij za pośrednictwem


Instrumentation.ProcessName Property

Definition

Return the name of the process this instrumentation is running in.

public virtual string? ProcessName { [Android.Runtime.Register("getProcessName", "()Ljava/lang/String;", "GetGetProcessNameHandler", ApiSince=26)] get; }
[<get: Android.Runtime.Register("getProcessName", "()Ljava/lang/String;", "GetGetProcessNameHandler", ApiSince=26)>]
member this.ProcessName : string

Property Value

Attributes

Remarks

Return the name of the process this instrumentation is running in. Note this should only be used for testing and debugging. If you are thinking about using this to, for example, conditionalize what is initialized in an Application class, it is strongly recommended to instead use lazy initialization (such as a getter for the state that only creates it when requested). This can greatly reduce the work your process does when created for secondary things, such as to receive a broadcast.

Java documentation for android.app.Instrumentation.getProcessName().

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.

Applies to