android system service 系统服务列表

  1     public abstract Object getSystemService(String name);
  2
  3     /**
  4      * Use with {@link #getSystemService} to retrieve a
  5      * {@link android.os.PowerManager} for controlling power management,
  6      * including "wake locks," which let you keep the device on while
  7      * you‘re running long tasks.
  8      */
  9     public static final String POWER_SERVICE = "power";
 10
 11     /**
 12      * Use with {@link #getSystemService} to retrieve a
 13      * {@link android.view.WindowManager} for accessing the system‘s window
 14      * manager.
 15      *
 16      * @see #getSystemService
 17      * @see android.view.WindowManager
 18      */
 19     public static final String WINDOW_SERVICE = "window";
 20
 21     /**
 22      * Use with {@link #getSystemService} to retrieve a
 23      * {@link android.view.LayoutInflater} for inflating layout resources in this
 24      * context.
 25      *
 26      * @see #getSystemService
 27      * @see android.view.LayoutInflater
 28      */
 29     public static final String LAYOUT_INFLATER_SERVICE = "layout_inflater";
 30
 31     /**
 32      * Use with {@link #getSystemService} to retrieve a
 33      * {@link android.accounts.AccountManager} for receiving intents at a
 34      * time of your choosing.
 35      *
 36      * @see #getSystemService
 37      * @see android.accounts.AccountManager
 38      */
 39     public static final String ACCOUNT_SERVICE = "account";
 40
 41     /**
 42      * Use with {@link #getSystemService} to retrieve a
 43      * {@link android.app.ActivityManager} for interacting with the global
 44      * system state.
 45      *
 46      * @see #getSystemService
 47      * @see android.app.ActivityManager
 48      */
 49     public static final String ACTIVITY_SERVICE = "activity";
 50
 51     /**
 52      * Use with {@link #getSystemService} to retrieve a
 53      * {@link android.app.AlarmManager} for receiving intents at a
 54      * time of your choosing.
 55      *
 56      * @see #getSystemService
 57      * @see android.app.AlarmManager
 58      */
 59     public static final String ALARM_SERVICE = "alarm";
 60
 61     /**
 62      * Use with {@link #getSystemService} to retrieve a
 63      * {@link android.app.NotificationManager} for informing the user of
 64      * background events.
 65      *
 66      * @see #getSystemService
 67      * @see android.app.NotificationManager
 68      */
 69     public static final String NOTIFICATION_SERVICE = "notification";
 70
 71     /**
 72      * Use with {@link #getSystemService} to retrieve a
 73      * {@link android.view.accessibility.AccessibilityManager} for giving the user
 74      * feedback for UI events through the registered event listeners.
 75      *
 76      * @see #getSystemService
 77      * @see android.view.accessibility.AccessibilityManager
 78      */
 79     public static final String ACCESSIBILITY_SERVICE = "accessibility";
 80
 81     /**
 82      * Use with {@link #getSystemService} to retrieve a
 83      * {@link android.app.NotificationManager} for controlling keyguard.
 84      *
 85      * @see #getSystemService
 86      * @see android.app.KeyguardManager
 87      */
 88     public static final String KEYGUARD_SERVICE = "keyguard";
 89
 90     /**
 91      * Use with {@link #getSystemService} to retrieve a {@link
 92      * android.location.LocationManager} for controlling location
 93      * updates.
 94      *
 95      * @see #getSystemService
 96      * @see android.location.LocationManager
 97      */
 98     public static final String LOCATION_SERVICE = "location";
 99
100     /**
101      * Use with {@link #getSystemService} to retrieve a
102      * {@link android.location.CountryDetector} for detecting the country that
103      * the user is in.
104      *
105      * @hide
106      */
107     public static final String COUNTRY_DETECTOR = "country_detector";
108
109     /**
110      * Use with {@link #getSystemService} to retrieve a {@link
111      * android.app.SearchManager} for handling searches.
112      *
113      * @see #getSystemService
114      * @see android.app.SearchManager
115      */
116     public static final String SEARCH_SERVICE = "search";
117
118     /**
119      * Use with {@link #getSystemService} to retrieve a {@link
120      * android.hardware.SensorManager} for accessing sensors.
121      *
122      * @see #getSystemService
123      * @see android.hardware.SensorManager
124      */
125     public static final String SENSOR_SERVICE = "sensor";
126
127     /**
128      * Use with {@link #getSystemService} to retrieve a {@link
129      * android.os.storage.StorageManager} for accessing system storage
130      * functions.
131      *
132      * @see #getSystemService
133      * @see android.os.storage.StorageManager
134      */
135     public static final String STORAGE_SERVICE = "storage";
136
137     /**
138      * Use with {@link #getSystemService} to retrieve a
139      * com.android.server.WallpaperService for accessing wallpapers.
140      *
141      * @see #getSystemService
142      */
143     public static final String WALLPAPER_SERVICE = "wallpaper";
144
145     /**
146      * Use with {@link #getSystemService} to retrieve a {@link
147      * android.os.Vibrator} for interacting with the vibration hardware.
148      *
149      * @see #getSystemService
150      * @see android.os.Vibrator
151      */
152     public static final String VIBRATOR_SERVICE = "vibrator";
153
154     /**
155      * Use with {@link #getSystemService} to retrieve a {@link
156      * android.app.StatusBarManager} for interacting with the status bar.
157      *
158      * @see #getSystemService
159      * @see android.app.StatusBarManager
160      * @hide
161      */
162     public static final String STATUS_BAR_SERVICE = "statusbar";
163
164     /**
165      * Use with {@link #getSystemService} to retrieve a {@link
166      * android.net.ConnectivityManager} for handling management of
167      * network connections.
168      *
169      * @see #getSystemService
170      * @see android.net.ConnectivityManager
171      */
172     public static final String CONNECTIVITY_SERVICE = "connectivity";
173
174     /**
175      * Use with {@link #getSystemService} to retrieve a {@link
176      * android.net.ThrottleManager} for handling management of
177      * throttling.
178      *
179      * @hide
180      * @see #getSystemService
181      * @see android.net.ThrottleManager
182      */
183     public static final String THROTTLE_SERVICE = "throttle";
184
185     /**
186      * Use with {@link #getSystemService} to retrieve a {@link
187      * android.os.IUpdateLock} for managing runtime sequences that
188      * must not be interrupted by headless OTA application or similar.
189      *
190      * @hide
191      * @see #getSystemService
192      * @see android.os.UpdateLock
193      */
194     public static final String UPDATE_LOCK_SERVICE = "updatelock";
195
196     /**
197      * Use with {@link #getSystemService} to retrieve a {@link
198      * android.net.NetworkManagementService} for handling management of
199      * system network services
200      *
201      * @hide
202      * @see #getSystemService
203      * @see android.net.NetworkManagementService
204      */
205     public static final String NETWORKMANAGEMENT_SERVICE = "network_management";
206
207     /** {@hide} */
208     public static final String NETWORK_STATS_SERVICE = "netstats";
209     /** {@hide} */
210     public static final String NETWORK_POLICY_SERVICE = "netpolicy";
211
212     /**
213      * Use with {@link #getSystemService} to retrieve a {@link
214      * android.net.wifi.WifiManager} for handling management of
215      * Wi-Fi access.
216      *
217      * @see #getSystemService
218      * @see android.net.wifi.WifiManager
219      */
220     public static final String WIFI_SERVICE = "wifi";
221
222     /**
223      * Use with {@link #getSystemService} to retrieve a {@link
224      * android.net.wifi.p2p.WifiP2pManager} for handling management of
225      * Wi-Fi peer-to-peer connections.
226      *
227      * @see #getSystemService
228      * @see android.net.wifi.p2p.WifiP2pManager
229      */
230     public static final String WIFI_P2P_SERVICE = "wifip2p";
231
232     /**
233      * Use with {@link #getSystemService} to retrieve a {@link
234      * android.net.nsd.NsdManager} for handling management of network service
235      * discovery
236      *
237      * @see #getSystemService
238      * @see android.net.nsd.NsdManager
239      */
240     public static final String NSD_SERVICE = "servicediscovery";
241
242     /**
243      * Use with {@link #getSystemService} to retrieve a
244      * {@link android.media.AudioManager} for handling management of volume,
245      * ringer modes and audio routing.
246      *
247      * @see #getSystemService
248      * @see android.media.AudioManager
249      */
250     public static final String AUDIO_SERVICE = "audio";
251
252     /**
253      * Use with {@link #getSystemService} to retrieve a
254      * {@link android.media.MediaRouter} for controlling and managing
255      * routing of media.
256      *
257      * @see #getSystemService
258      * @see android.media.MediaRouter
259      */
260     public static final String MEDIA_ROUTER_SERVICE = "media_router";
261
262     /**
263      * Use with {@link #getSystemService} to retrieve a
264      * {@link android.telephony.TelephonyManager} for handling management the
265      * telephony features of the device.
266      *
267      * @see #getSystemService
268      * @see android.telephony.TelephonyManager
269      */
270     public static final String TELEPHONY_SERVICE = "phone";
271
272     /**
273      * Use with {@link #getSystemService} to retrieve a
274      * {@link android.text.ClipboardManager} for accessing and modifying
275      * the contents of the global clipboard.
276      *
277      * @see #getSystemService
278      * @see android.text.ClipboardManager
279      */
280     public static final String CLIPBOARD_SERVICE = "clipboard";
281
282     /**
283      * Use with {@link #getSystemService} to retrieve a
284      * {@link android.view.inputmethod.InputMethodManager} for accessing input
285      * methods.
286      *
287      * @see #getSystemService
288      */
289     public static final String INPUT_METHOD_SERVICE = "input_method";
290
291     /**
292      * Use with {@link #getSystemService} to retrieve a
293      * {@link android.view.textservice.TextServicesManager} for accessing
294      * text services.
295      *
296      * @see #getSystemService
297      */
298     public static final String TEXT_SERVICES_MANAGER_SERVICE = "textservices";
299
300     /**
301      * Use with {@link #getSystemService} to retrieve a
302      * {@link android.appwidget.AppWidgetManager} for accessing AppWidgets.
303      *
304      * @hide
305      * @see #getSystemService
306      */
307     public static final String APPWIDGET_SERVICE = "appwidget";
308
309     /**
310      * Use with {@link #getSystemService} to retrieve an
311      * {@link android.app.backup.IBackupManager IBackupManager} for communicating
312      * with the backup mechanism.
313      * @hide
314      *
315      * @see #getSystemService
316      */
317     public static final String BACKUP_SERVICE = "backup";
318
319     /**
320      * Use with {@link #getSystemService} to retrieve a
321      * {@link android.os.DropBoxManager} instance for recording
322      * diagnostic logs.
323      * @see #getSystemService
324      */
325     public static final String DROPBOX_SERVICE = "dropbox";
326
327     /**
328      * Use with {@link #getSystemService} to retrieve a
329      * {@link android.app.admin.DevicePolicyManager} for working with global
330      * device policy management.
331      *
332      * @see #getSystemService
333      */
334     public static final String DEVICE_POLICY_SERVICE = "device_policy";
335
336     /**
337      * Use with {@link #getSystemService} to retrieve a
338      * {@link android.app.UiModeManager} for controlling UI modes.
339      *
340      * @see #getSystemService
341      */
342     public static final String UI_MODE_SERVICE = "uimode";
343
344     /**
345      * Use with {@link #getSystemService} to retrieve a
346      * {@link android.app.DownloadManager} for requesting HTTP downloads.
347      *
348      * @see #getSystemService
349      */
350     public static final String DOWNLOAD_SERVICE = "download";
351
352     /**
353      * Use with {@link #getSystemService} to retrieve a
354      * {@link android.nfc.NfcManager} for using NFC.
355      *
356      * @see #getSystemService
357      */
358     public static final String NFC_SERVICE = "nfc";
359
360     /**
361      * Use with {@link #getSystemService} to retrieve a
362      * {@link android.bluetooth.BluetoothAdapter} for using Bluetooth.
363      *
364      * @see #getSystemService
365      * @hide
366      */
367     public static final String BLUETOOTH_SERVICE = "bluetooth";
368
369     /**
370      * Use with {@link #getSystemService} to retrieve a
371      * {@link android.net.sip.SipManager} for accessing the SIP related service.
372      *
373      * @see #getSystemService
374      */
375     /** @hide */
376     public static final String SIP_SERVICE = "sip";
377
378     /**
379      * Use with {@link #getSystemService} to retrieve a {@link
380      * android.hardware.usb.UsbManager} for access to USB devices (as a USB host)
381      * and for controlling this device‘s behavior as a USB device.
382      *
383      * @see #getSystemService
384      * @see android.harware.usb.UsbManager
385      */
386     public static final String USB_SERVICE = "usb";
387
388     /**
389      * Use with {@link #getSystemService} to retrieve a {@link
390      * android.hardware.SerialManager} for access to serial ports.
391      *
392      * @see #getSystemService
393      * @see android.harware.SerialManager
394      *
395      * @hide
396      */
397     public static final String SERIAL_SERVICE = "serial";
398
399     /**
400      * Use with {@link #getSystemService} to retrieve a
401      * {@link android.hardware.input.InputManager} for interacting with input devices.
402      *
403      * @see #getSystemService
404      * @see android.hardware.input.InputManager
405      */
406     public static final String INPUT_SERVICE = "input";
407
408     /**
409      * Use with {@link #getSystemService} to retrieve a
410      * {@link android.hardware.display.DisplayManager} for interacting with display devices.
411      *
412      * @see #getSystemService
413      * @see android.hardware.display.DisplayManager
414      */
415     public static final String DISPLAY_SERVICE = "display";
416
417     /**
418      * Use with {@link #getSystemService} to retrieve a
419      * {@link android.os.SchedulingPolicyService} for managing scheduling policy.
420      *
421      * @see #getSystemService
422      * @see android.os.SchedulingPolicyService
423      *
424      * @hide
425      */
426     public static final String SCHEDULING_POLICY_SERVICE = "scheduling_policy";
427
428     /**
429      * Use with {@link #getSystemService} to retrieve a
430      * {@link android.os.UserManager} for managing users on devices that support multiple users.
431      *
432      * @see #getSystemService
433      * @see android.os.UserManager
434      */
435     public static final String USER_SERVICE = "user";

from context.class

时间: 2024-10-06 22:22:20

android system service 系统服务列表的相关文章

【Android】Android中Service类onStartCommand的返回值有关问题(转)

@Override public int onStartCommand(Intent intent, int flags, int startId) { System.out.println("---------->>onStartCommand2"); return super.onStartCommand(intent, flags, startId); } Android开发的过程中,每次调用startService(Intent)的时候,都会调用该Service对象

Android中Service的使用

我个人的理解是:我们平时使用的android系统的app的后台应用,就是这个原理 可以利用Service实现程序在后台运行,依照这个原理,可以通过Service来实现关键代码的运行与实现. <一>下面大体说一下我在极客学院跟着视频做的一个Service的小实现 1,首先点击左上角file->new往下拉,看到一个Service,创建MyService.java 这个就是我们的Service服务. 后续可以在这其中添加想要在后台运行的关键代码等. 2,首先创建项目后,在layout或中的x

Android System Property 解析

一 System Property 今天在折腾HDMI 显示这块的时候,为Setting提供接口时候,遇到很多跟Android系统属性相关的问题.因此,顺便分析和总结一些. android的代码中大量存在:SystemProperties.set()/SystemProperties.get():通过这两个接口可以对系统的属性进行读取/设置, 顾名思义系统属性,肯定对整个系统全局共享.通常程序的执行以进程为单位各自相互独立,如何实现全局共享呢? System Properties是怎么一回事,又

Android之Service的细枝末节

转载注明出处:http://blog.csdn.net/xiaohanluo/article/details/53675312 1. 简介 与前一篇Android之Activity的细枝末节是同一系列的文章,是自己在学习和研发过程中,对Service的一些知识点的总结,汇总得到这篇文章. 这篇文章会从Service的一些小知识点,延伸到Android中几种常用进程间通信方法. 2. 进程 Service是一种不提供用户交互页面但是可以在后台长时间运行的组件,可以通过在AndroidManifes

Android中service用法

Service翻译: Class Overview A Service is an application component representing either an application's desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use. Each servi

Android服务Service使用总结

一.Service简介 Service是android 系统中的四大组件之一(Activity.Service.BroadcastReceiver. ContentProvider),它跟Activity的级别差不多,但不能页面显示只能后台运行,并且可以和其他组件进行交互.service可以在很多场合的应用中使用,比如播放多媒体的时候用户启动了其他Activity这个时候程序要在后台继续播放,比如检测SD卡上文件的变化,再或者在后台记录你地理信息位置的改变等等,总之服务总是藏在后台的,例如,一个

Android之——Service总结

转载请注明出处:http://blog.csdn.net/l1028386804/article/details/47207467 Service通常总是称之为"后台服务",其中"后台"一词是相对于前台而言的,具体是指其本身的运行并不依赖于用户可视的UI界面,因此,从实际业务需求上来理解,Service的适用场景应该具备以下条件: 1.并不依赖于用户可视的UI界面(当然,这一条其实也不是绝对的,如前台Service就是与Notification界面结合使用的): 2

Android服务(Service)研究

Service是android四大组件之一,没有用户界面,一直在后台运行. 为什么使用Service启动新线程执行耗时任务,而不直接在Activity中启动一个子线程处理? 1.Activity会被用户退出,Activity所在的进程就变成了空进程(没有任何活动组件的进程),系统需要内存可能会优先终止该进程: 2.如果宿主进程被终止,那么该进程内所有的子线程也会被终止,这样可能导致子线程无法执行完成: 3.其实两种方式都是可以处理耗时任务的,使用场景不同而已. 一.通过Start方式启动Serv

Android中Service 全解析

在学习Android四大模块的时候在service的学习是必须要掌握的,而且个人感觉相当重要!很多场合都有需要的! 首先我们看看Service的种类 按运行地点分类 以上面三种方式启动的服务其生命周期也有区别,将在随后给出. 2.Service 与 Thread 的区别 很多时候,你可能会问,为什么要用 Service,而不用 Thread 呢,因为用 Thread 是很方便的,比起 Service 也方便多了,下面我详细的来解释一下. 1). Thread:Thread 是程序执行的最小单元,