Compartilhar via


Process Class

Definition

Tools for managing OS processes.

[Android.Runtime.Register("android/os/Process", DoNotGenerateAcw=true)]
public class Process : Java.Lang.Object
[<Android.Runtime.Register("android/os/Process", DoNotGenerateAcw=true)>]
type Process = class
    inherit Object
Inheritance
Process
Attributes

Remarks

Tools for managing OS processes.

Java documentation for android.os.Process.

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.

Constructors

Process()
Process(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Fields

BluetoothGid
BluetoothUid

Defines the UID/GID for the Bluetooth service process.

FirstApplicationUid

Defines the start of a range of UIDs (and GIDs), going from this number to #LAST_APPLICATION_UID that are reserved for assigning to applications.

InvalidPid

An invalid PID value.

InvalidUid

An invalid UID value.

LastApplicationUid

Last of application-specific UIDs starting at #FIRST_APPLICATION_UID.

PhoneUid

Defines the UID/GID under which the telephony code runs.

RootUid

Defines the root UID.

ShellUid

Defines the UID/GID for the user shell.

SystemUid

Defines the UID/GID under which system code runs.

WifiUid

Defines the UID/GID for the WIFI native processes like wificond, supplicant, hostapd, vendor HAL, etc.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
ElapsedCpuTime

Returns elapsed milliseconds of the time this process has run.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsIsolated

Returns whether the current process is in an isolated sandbox.

IsSdkSandbox

Returns whether the current process is a sdk sandbox process.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
StartElapsedRealtime

Return the SystemClock#elapsedRealtime() at which this process was started, but before any of the application code was executed.

StartRequestedElapsedRealtime

Return the SystemClock#elapsedRealtime() at which the system was about to start this process.

StartRequestedUptimeMillis

Return the SystemClock#uptimeMillis() at which the system was about to start this process.

StartUptimeMillis

Return the SystemClock#uptimeMillis() at which this process was started, but before any of the application code was executed.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetExclusiveCores()

On some devices, the foreground process may have one or more CPU cores exclusively reserved for it.

GetGidForName(String)

Returns the GID assigned to a particular user name, or -1 if there is none.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetThreadPriority(Int32)

Return the current priority of a thread, based on Linux priorities.

GetUidForName(String)

Returns the UID assigned to a particular user name, or -1 if there is none.

Is64Bit()

Returns true if the current process is a 64-bit runtime.

IsApplicationUid(Int32)

Returns whether the given uid belongs to an application.

IsIsolatedUid(Int32)

Returns whether the process with the given uid is an isolated sandbox.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
KillProcess(Int32)

Kill the process with the given PID.

MyPid()

Returns the identifier of this process, which can be used with #killProcess and #sendSignal.

MyProcessName()

Return the name of this process.

MyTid()

Returns the identifier of the calling thread, which be used with #setThreadPriority(int, int).

MyUid()

Returns the identifier of this process's uid.

MyUserHandle()

Returns this process's user handle.

Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SendSignal(Int32, Signal)

Send a signal to the given process.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetThreadPriority(Int32, ThreadPriority)

Set the priority of a thread, based on Linux priorities.

SetThreadPriority(ThreadPriority)

Set the priority of the calling thread, based on Linux priorities.

SupportsProcesses()
Obsolete.

Determine whether the current environment supports multiple processes.

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to