Added in API level 1

RunningServiceInfo


open class RunningServiceInfo : Parcelable
kotlin.Any
   ↳ android.app.ActivityManager.RunningServiceInfo

Information you can retrieve about a particular Service that is currently running in the system.

Summary

Constants
static Int

Bit for flags: set if the service has asked to run as a foreground process.

static Int

Bit for flags: set if the service is running in a persistent process.

static Int

Bit for flags: set if this service has been explicitly started.

static Int

Bit for flags: set if the service is running in a core system process.

Inherited constants
Public constructors

Public methods
open Int

open Unit

open Unit
writeToParcel(dest: Parcel, flags: Int)

Properties
static Parcelable.Creator<ActivityManager.RunningServiceInfo!>

Long

The time when the service was first made active, either by someone starting or binding to it.

Int

Number of clients connected to the service.

Int

For special services that are bound to by system code, this is a string resource providing a user-visible label for who the client is.

String!

For special services that are bound to by system code, this is the package that holds the binding.

Int

Number of times the service's process has crashed while the service is running.

Int

Running flags.

Boolean

Set to true if the service has asked to run as a foreground process.

Long

The time when there was last activity in the service (either explicit requests to start it or clients binding to it).

Int

If non-zero, this is the process the service is running in.

String!

The name of the process this service runs in.

Long

If non-zero, this service is not currently running, but scheduled to restart at the given time.

ComponentName!

The service component.

Boolean

Set to true if this service has been explicitly started.

Int

The UID that owns this service.

Constants

FLAG_FOREGROUND

Added in API level 5
static val FLAG_FOREGROUND: Int

Bit for flags: set if the service has asked to run as a foreground process.

Value: 2

FLAG_PERSISTENT_PROCESS

Added in API level 5
static val FLAG_PERSISTENT_PROCESS: Int

Bit for flags: set if the service is running in a persistent process.

Value: 8

FLAG_STARTED

Added in API level 5
static val FLAG_STARTED: Int

Bit for flags: set if this service has been explicitly started.

Value: 1

FLAG_SYSTEM_PROCESS

Added in API level 5
static val FLAG_SYSTEM_PROCESS: Int

Bit for flags: set if the service is running in a core system process.

Value: 4

Public constructors

RunningServiceInfo

Added in API level 1
RunningServiceInfo()

Public methods

describeContents

Added in API level 1
open fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

readFromParcel

Added in API level 1
open fun readFromParcel(source: Parcel!): Unit

writeToParcel

Added in API level 1
open fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit
Parameters
dest Parcel: The Parcel in which the object should be written. This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 1
static val CREATOR: Parcelable.Creator<ActivityManager.RunningServiceInfo!>

activeSince

Added in API level 1
var activeSince: Long

The time when the service was first made active, either by someone starting or binding to it. This is in units of android.os.SystemClock#elapsedRealtime().

clientCount

Added in API level 1
var clientCount: Int

Number of clients connected to the service.

clientLabel

Added in API level 5
var clientLabel: Int

For special services that are bound to by system code, this is a string resource providing a user-visible label for who the client is.

clientPackage

Added in API level 5
var clientPackage: String!

For special services that are bound to by system code, this is the package that holds the binding.

crashCount

Added in API level 1
var crashCount: Int

Number of times the service's process has crashed while the service is running.

flags

Added in API level 5
var flags: Int

Running flags.

foreground

Added in API level 1
var foreground: Boolean

Set to true if the service has asked to run as a foreground process.

lastActivityTime

Added in API level 1
var lastActivityTime: Long

The time when there was last activity in the service (either explicit requests to start it or clients binding to it). This is in units of android.os.SystemClock#uptimeMillis().

pid

Added in API level 1
var pid: Int

If non-zero, this is the process the service is running in.

process

Added in API level 1
var process: String!

The name of the process this service runs in.

restarting

Added in API level 1
var restarting: Long

If non-zero, this service is not currently running, but scheduled to restart at the given time.

service

Added in API level 1
var service: ComponentName!

The service component.

started

Added in API level 1
var started: Boolean

Set to true if this service has been explicitly started.

uid

Added in API level 5
var uid: Int

The UID that owns this service.