ActivityManager.RunningServiceInfo
public
static
class
ActivityManager.RunningServiceInfo
extends Object
implements
Parcelable
| java.lang.Object | |
| ↳ | android.app.ActivityManager.RunningServiceInfo |
Information you can retrieve about a particular Service that is currently running in the system.
Summary
Constants | |
|---|---|
int |
FLAG_FOREGROUND
Bit for |
int |
FLAG_PERSISTENT_PROCESS
Bit for |
int |
FLAG_STARTED
Bit for |
int |
FLAG_SYSTEM_PROCESS
Bit for |
Inherited constants |
|---|
android.os.Parcelable
|
Fields | |
|---|---|
public
static
final
Creator<ActivityManager.RunningServiceInfo> |
CREATOR
|
public
long |
activeSince
The time when the service was first made active, either by someone starting or binding to it. |
public
int |
clientCount
Number of clients connected to the service. |
public
int |
clientLabel
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. |
public
String |
clientPackage
For special services that are bound to by system code, this is the package that holds the binding. |
public
int |
crashCount
Number of times the service's process has crashed while the service is running. |
public
int |
flags
Running flags. |
public
boolean |
foreground
Set to true if the service has asked to run as a foreground process. |
public
long |
lastActivityTime
The time when there was last activity in the service (either explicit requests to start it or clients binding to it). |
public
int |
pid
If non-zero, this is the process the service is running in. |
public
String |
process
The name of the process this service runs in. |
public
long |
restarting
If non-zero, this service is not currently running, but scheduled to restart at the given time. |
public
ComponentName |
service
The service component. |
public
boolean |
started
Set to true if this service has been explicitly started. |
public
int |
uid
The UID that owns this service. |
Public constructors | |
|---|---|
ActivityManager.RunningServiceInfo()
|
|
Public methods | |
|---|---|
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
void
|
readFromParcel(Parcel source)
|
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |
|---|---|
java.lang.Object
| |
android.os.Parcelable
| |
Constants
FLAG_FOREGROUND
int FLAG_FOREGROUND
Bit for flags: set if the service has asked to
run as a foreground process.
Constant Value: 2 (0x00000002)
FLAG_PERSISTENT_PROCESS
int FLAG_PERSISTENT_PROCESS
Bit for flags: set if the service is running in a
persistent process.
Constant Value: 8 (0x00000008)
FLAG_STARTED
int FLAG_STARTED
Bit for flags: set if this service has been
explicitly started.
Constant Value: 1 (0x00000001)
FLAG_SYSTEM_PROCESS
int FLAG_SYSTEM_PROCESS
Bit for flags: set if the service is running in a
core system process.
Constant Value: 4 (0x00000004)
Fields
activeSince
long activeSince
The time when the service was first made active, either by someone
starting or binding to it. This
is in units of elapsedRealtime().
clientLabel
int clientLabel
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
String clientPackage
For special services that are bound to by system code, this is the package that holds the binding.
crashCount
int crashCount
Number of times the service's process has crashed while the service is running.
foreground
boolean foreground
Set to true if the service has asked to run as a foreground process.
lastActivityTime
long lastActivityTime
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 uptimeMillis().
restarting
long restarting
If non-zero, this service is not currently running, but scheduled to restart at the given time.
started
boolean started
Set to true if this service has been explicitly started.
Public constructors
Public methods
describeContents
int describeContents ()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of writeToParcel(Parcel, int),
the return value of this method must include the
CONTENTS_FILE_DESCRIPTOR bit.
| Returns | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
writeToParcel
void writeToParcel (Parcel dest, int flags)
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: The Parcel in which the object should be written. |
flags |
int: Additional flags about how the object should be written.
May be 0 or PARCELABLE_WRITE_RETURN_VALUE.
|
Interfaces
- ActionBar.OnMenuVisibilityListener
- ActionBar.OnNavigationListener
- ActionBar.TabListener
- AlarmManager.OnAlarmListener
- Application.ActivityLifecycleCallbacks
- Application.OnProvideAssistDataListener
- AppOpsManager.OnOpChangedListener
- DatePickerDialog.OnDateSetListener
- FragmentBreadCrumbs.OnBreadCrumbClickListener
- FragmentManager.BackStackEntry
- FragmentManager.OnBackStackChangedListener
- KeyguardManager.OnKeyguardExitResult
- LoaderManager.LoaderCallbacks
- Notification.Action.Extender
- Notification.Extender
- PendingIntent.OnFinished
- SearchManager.OnCancelListener
- SearchManager.OnDismissListener
- SharedElementCallback.OnSharedElementsReadyListener
- TimePickerDialog.OnTimeSetListener
- UiAutomation.AccessibilityEventFilter
- UiAutomation.OnAccessibilityEventListener
Classes
- ActionBar
- ActionBar.LayoutParams
- ActionBar.Tab
- Activity
- ActivityGroup
- ActivityManager
- ActivityManager.AppTask
- ActivityManager.MemoryInfo
- ActivityManager.ProcessErrorStateInfo
- ActivityManager.RecentTaskInfo
- ActivityManager.RunningAppProcessInfo
- ActivityManager.RunningServiceInfo
- ActivityManager.RunningTaskInfo
- ActivityManager.TaskDescription
- ActivityOptions
- AlarmManager
- AlarmManager.AlarmClockInfo
- AlertDialog
- AlertDialog.Builder
- AliasActivity
- Application
- ApplicationErrorReport
- ApplicationErrorReport.AnrInfo
- ApplicationErrorReport.BatteryInfo
- ApplicationErrorReport.CrashInfo
- ApplicationErrorReport.RunningServiceInfo
- AppOpsManager
- AutomaticZenRule
- DatePickerDialog
- Dialog
- DialogFragment
- DownloadManager
- DownloadManager.Query
- DownloadManager.Request
- ExpandableListActivity
- Fragment
- Fragment.SavedState
- FragmentBreadCrumbs
- FragmentContainer
- FragmentController
- FragmentHostCallback
- FragmentManager
- FragmentManager.FragmentLifecycleCallbacks
- FragmentManagerNonConfig
- FragmentTransaction
- Instrumentation
- Instrumentation.ActivityMonitor
- Instrumentation.ActivityResult
- IntentService
- KeyguardManager
- KeyguardManager.KeyguardDismissCallback
- KeyguardManager.KeyguardLock
- LauncherActivity
- LauncherActivity.IconResizer
- LauncherActivity.ListItem
- ListActivity
- ListFragment
- LoaderManager
- LocalActivityManager
- MediaRouteActionProvider
- MediaRouteButton
- NativeActivity
- Notification
- Notification.Action
- Notification.Action.Builder
- Notification.Action.WearableExtender
- Notification.BigPictureStyle
- Notification.BigTextStyle
- Notification.Builder
- Notification.CarExtender
- Notification.CarExtender.Builder
- Notification.CarExtender.UnreadConversation
- Notification.DecoratedCustomViewStyle
- Notification.DecoratedMediaCustomViewStyle
- Notification.InboxStyle
- Notification.MediaStyle
- Notification.MessagingStyle
- Notification.MessagingStyle.Message
- Notification.Style
- Notification.WearableExtender
- NotificationChannel
- NotificationChannelGroup
- NotificationManager
- NotificationManager.Policy
- PendingIntent
- PictureInPictureParams
- PictureInPictureParams.Builder
- Presentation
- ProgressDialog
- RemoteAction
- RemoteInput
- RemoteInput.Builder
- SearchableInfo
- SearchManager
- Service
- SharedElementCallback
- TabActivity
- TaskStackBuilder
- TimePickerDialog
- UiAutomation
- UiModeManager
- VoiceInteractor
- VoiceInteractor.AbortVoiceRequest
- VoiceInteractor.CommandRequest
- VoiceInteractor.CompleteVoiceRequest
- VoiceInteractor.ConfirmationRequest
- VoiceInteractor.PickOptionRequest
- VoiceInteractor.PickOptionRequest.Option
- VoiceInteractor.Prompt
- VoiceInteractor.Request
- WallpaperInfo
- WallpaperManager
Exceptions