系统服务及权限设置
来源:互联网 发布:部落冲突攻略软件 编辑:程序博客网 时间:2024/06/12 00:16
1 活动管理器
权限 <uses-permission android:name="android.permission.GET_TASKS"/>
代码 ActivityManager activityManager = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
2 警报管理器
权限
代码 AlarmManager alarmManager = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
3 音频管理器
权限
代码 AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
4 剪贴板管理器
权限
代码 ClipboardManager clipboardManager = (ClipboardManager)getSystemService(Context.CLIPBOARD_SERVICE);
5 连接管理器
权限 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
代码 ConnectivityManager connectivityManager = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
6 输入法管理器
权限
代码 InputMethodManager inputMethodManager = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
7 键盘管理器
权限
代码 KeyguardManager keyguardManager = (KeyguardManager)getSystemService(Context.KEYGUARD_SERVICE);
8 布局解压器管理器
权限
代码 LayoutInflater layoutInflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
9 位置管理器
权限
代码 LocationManager locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
10 通知管理器
权限
代码 NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
11 电源管理器
权限 <uses-permission android:name="android.permission.DEVICE_POWER"/>
代码 PowerManager powerManager = (PowerManager)getSystemService(Context.POWER_SERVICE);
12 搜索管理器
权限
代码 SearchManager searchManager = (SearchManager)getSystemService(Context.SEARCH_SERVICE);
13 传感器管理器
权限
代码 SensorManager sensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE);
14 电话管理器
权限 <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
代码 TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
15 振动器
权限 <uses-permission android:name="android.permission.VIBRATE"/>
代码 Vibrator vibrator = (Vibrator)getSystemService(Context.VIBRATOR_SERVICE);
16 墙纸
权限 <uses-permission android:name="android.permission.SET_WALLPAPER"/>
代码 WallpaperService wallpaperService = (WallpaperService)getSystemService(Context.WALLPAPER_SERVICE);
17 Wi-Fi管理器
权限 <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
代码 WifiManager wifiManager = (WifiManager)getSystemService(Context.WIFI_SERVICE);
18 窗口管理器
权限
代码 WindowManager windowManager = (WindowManager)getSystemService(Context.WINDOW_SERVICE);
权限 <uses-permission android:name="android.permission.GET_TASKS"/>
代码 ActivityManager activityManager = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
2 警报管理器
权限
代码 AlarmManager alarmManager = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
3 音频管理器
权限
代码 AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
4 剪贴板管理器
权限
代码 ClipboardManager clipboardManager = (ClipboardManager)getSystemService(Context.CLIPBOARD_SERVICE);
5 连接管理器
权限 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
代码 ConnectivityManager connectivityManager = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
6 输入法管理器
权限
代码 InputMethodManager inputMethodManager = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
7 键盘管理器
权限
代码 KeyguardManager keyguardManager = (KeyguardManager)getSystemService(Context.KEYGUARD_SERVICE);
8 布局解压器管理器
权限
代码 LayoutInflater layoutInflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
9 位置管理器
权限
代码 LocationManager locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
10 通知管理器
权限
代码 NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
11 电源管理器
权限 <uses-permission android:name="android.permission.DEVICE_POWER"/>
代码 PowerManager powerManager = (PowerManager)getSystemService(Context.POWER_SERVICE);
12 搜索管理器
权限
代码 SearchManager searchManager = (SearchManager)getSystemService(Context.SEARCH_SERVICE);
13 传感器管理器
权限
代码 SensorManager sensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE);
14 电话管理器
权限 <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
代码 TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
15 振动器
权限 <uses-permission android:name="android.permission.VIBRATE"/>
代码 Vibrator vibrator = (Vibrator)getSystemService(Context.VIBRATOR_SERVICE);
16 墙纸
权限 <uses-permission android:name="android.permission.SET_WALLPAPER"/>
代码 WallpaperService wallpaperService = (WallpaperService)getSystemService(Context.WALLPAPER_SERVICE);
17 Wi-Fi管理器
权限 <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
代码 WifiManager wifiManager = (WifiManager)getSystemService(Context.WIFI_SERVICE);
18 窗口管理器
权限
代码 WindowManager windowManager = (WindowManager)getSystemService(Context.WINDOW_SERVICE);
0 0
- 系统服务及权限设置
- 系统服务及权限设置
- android系统服务及权限设置
- Ubuntu启动流程及系统服务设置
- Ubuntu启动流程及系统服务设置
- win7 系统服务详解及设置参考
- Ubuntu启动流程及系统服务设置
- asp.net启动win2003系统服务权限设置
- linux系统创建SFTP用户及设置其chroot权限
- 权限系统的设置
- Win7系统 权限设置
- android系统权限设置
- OA系统设置权限
- 设置scrapyd为系统后台服务及系统启动项
- windows系统mongodb配置服务及设置密码
- windows系统服务设置
- ntsysv:设置系统服务
- 【系统服务】系统权限的申请
- [WEB]Jetty的结构
- Hibernate 4.3.5 官方文档滞后,整理出一份可运行的源码【类似Student马士兵3.3版,亲测可用】
- HUNTERSUN(汉天下)样片申请与经验
- 常用ubuntu命令收集(持续更新)
- Mac下显示隐藏文件
- 系统服务及权限设置
- 嵌入式课程设计实践(一)——环境搭建
- 单例与枚举类型
- LeetCode 150 Evaluate Reverse Polish Notation
- Android中滑屏初探 - scrollTo 以及 scrollBy方法使用说明
- 同步传输与异步传输
- OCP-1Z0-051 补充题库 第19题 限制替代变量的输入值
- [CPPHTP7 NOTES] CH8. POINTERS(3)
- bzoj1611[Usaco2008 Feb]Meteor Shower流星雨