getSystemService()简介
来源:互联网 发布:mac上的ps软件 编辑:程序博客网 时间:2024/06/07 09:49
Android后台运行着很多service,它们随着系统启动时开始运行,支持系统的正常工作,应用程序可以通过Manager接口来访问system提供的数据.
getSystemService()是Context类中的一个方法,它接受一个字符串参数来确定获取系统的哪个服务,并返回相应的服务对象(manager).
- WINDOW_SERVICE ("window")
The top-level window manager in which you can place custom windows.The returned object is aWindowManager. - LAYOUT_INFLATER_SERVICE ("layout_inflater")
A LayoutInflater for inflating layout resources in thiscontext. - ACTIVITY_SERVICE ("activity")
A ActivityManager for interacting with the global activity state ofthe system. - POWER_SERVICE ("power")
A PowerManager for controlling powermanagement. - ALARM_SERVICE ("alarm")
A AlarmManager for receiving intents at the time of yourchoosing. - NOTIFICATION_SERVICE ("notification")
A NotificationManager for informing the user of backgroundevents. - KEYGUARD_SERVICE ("keyguard")
A KeyguardManager for controlling keyguard. - LOCATION_SERVICE ("location")
A LocationManager for controlling location (e.g., GPS)updates. - SEARCH_SERVICE ("search")
A SearchManager for handling search. - VIBRATOR_SERVICE ("vibrator")
A Vibrator for interacting with the vibratorhardware. - CONNECTIVITY_SERVICE ("connection")
A ConnectivityManager for handling management of networkconnections. - WIFI_SERVICE ("wifi")
A WifiManager for management of Wi-Ficonnectivity. - INPUT_METHOD_SERVICE ("input_method")
An InputMethodManager for management of inputmethods. - UI_MODE_SERVICE ("uimode")
An UiModeManager for controlling UI modes. - DOWNLOAD_SERVICE ("download")
A DownloadManager for requesting HTTP downloads
- TELEPHONY_SERVICE
A TelephonyManager forprovideing access to information about the telephony services on the device
Note: System services obtained via this API may be closelyassociated with the Context in which they are obtained from. Ingeneral, do not share the service objects between various differentcontexts (Activities, Applications, Services, Providers,etc.)
0 0
- getSystemService()简介
- getSystemService
- getSystemService
- getSystemService
- getSystemService
- getSystemService
- getSystemService
- getSystemService
- getSystemService
- getSystemService
- getSystemService
- getSystemService ()
- getSystemService
- getSystemService
- getSystemService
- getSystemService
- getSystemService
- getSystemService
- STL中bitset的用法的整理
- Qt之图形(转换)
- JavaScript正则表达式下——相关方法
- dubbo底层NIO介绍
- CodeForces - 552D Vanya and Triangles (数学几何求三角形个数)水
- getSystemService()简介
- 全渠道-零售门店转型方案初探 (一)
- 3dsMax界面概述
- How to program EMW3165 using command line interface?
- 链接/Axis2
- STM32 USB学习笔记
- Android实现点击更换头像
- lintcode之两数之和
- Java指定长度随机生成的字符串,且这个字符串必须包含大小写字母和数字