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   | 
        
| static Int | 
            
             Bit for   | 
        
| static Int | 
            
             Bit for   | 
        
| static Int | 
            
             Bit for   | 
        
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
| Public methods | |
|---|---|
| open Int | |
| open Unit | 
            readFromParcel(source: Parcel!) | 
        
| 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
static val FLAG_FOREGROUND: Int
Bit for flags: set if the service has asked to run as a foreground process.
Value: 2FLAG_PERSISTENT_PROCESS
static val FLAG_PERSISTENT_PROCESS: Int
Bit for flags: set if the service is running in a persistent process.
Value: 8FLAG_STARTED
static val FLAG_STARTED: Int
Bit for flags: set if this service has been explicitly started.
Value: 1FLAG_SYSTEM_PROCESS
static val FLAG_SYSTEM_PROCESS: Int
Bit for flags: set if the service is running in a core system process.
Value: 4Public constructors
Public methods
describeContents
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 | 
          
writeToParcel
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
static val CREATOR: Parcelable.Creator<ActivityManager.RunningServiceInfo!>
activeSince
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().
clientLabel
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
var clientPackage: String!
For special services that are bound to by system code, this is the package that holds the binding.
crashCount
var crashCount: Int
Number of times the service's process has crashed while the service is running.
foreground
var foreground: Boolean
Set to true if the service has asked to run as a foreground process.
lastActivityTime
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().
restarting
var restarting: Long
If non-zero, this service is not currently running, but scheduled to restart at the given time.
started
var started: Boolean
Set to true if this service has been explicitly started.