码迷,mamicode.com
首页 >  
搜索关键字:getsystemservice    ( 396个结果
android获取系统wifi状态等
android获取系统wifi状态等WIFI 获取WIFI状态 WifiManager wifiManager = (WifiManager)context.getSystemService(Context.WIFI_SERVICE); if(wifiManager != null){...
分类:移动开发   时间:2015-09-21 17:11:59    阅读次数:173
android -- 之PopupWindow的使用
LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE); View contentView = inflater.inflate(R.layout.popwindow, null);.....
分类:移动开发   时间:2015-09-21 10:34:44    阅读次数:153
android 进程间通信---Service Manager(2)
关于servicemanager的设计:还是这张结构图,由于ProcessState & IPCThreadState是与binder deriver交互的,所以对于client端来说BpBinder以下的部分是透明的。我们从Activity的getsystemservice来一步步分析整个serv...
分类:移动开发   时间:2015-09-20 10:24:24    阅读次数:253
如何检查后台服务(Android的Service类)是否正在运行?
private boolean isServiceRunning() { ActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE); for (RunningServiceInfo ser...
分类:移动开发   时间:2015-09-05 13:42:43    阅读次数:180
Notification 的进度条 简单展示
Notification的原生实现基本可以包括: 使用getSystemService(context.Notification_service) 获取 Notificationmanager 的引用 使用Notification Builder来构建 Notification 使用前面 的 NotificationManager ...
分类:其他好文   时间:2015-08-31 17:47:00    阅读次数:231
Android之getSystemService 详解
android的后台运行在很多service,它们在系统启动时被SystemServer开启,支持系统的正常工作,比如MountService监 听是否有SD卡安装及移除,ClipboardService提供剪切板功能,PackageManagerService提供软件包的安装移除及查看等 等,应用...
分类:移动开发   时间:2015-08-31 14:50:33    阅读次数:142
[Android Pro] 通过IMSI判断手机是移动、联通、电信
TelephonyManager telManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);/** 获取SIM卡的IMSI码 * SIM卡唯一标识:IMSI 国际移动用户识别码(IMSI:Internati...
分类:移动开发   时间:2015-08-31 13:25:33    阅读次数:234
Android传感器
Android传感器开发传感器应用1. 获取传感器管理者对象// 获取传感器对象 SensorManager mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);2. 获取指定的传感器对象// 获取指定的传感器 加速度传感器 Sensor sensor = mSensorManager.getDefaul...
分类:移动开发   时间:2015-08-31 01:20:19    阅读次数:355
android 判断手机中是否有SD卡,USB。静态判断
public static String getSDPath(Context context) { String sd = null; StorageManager storageManager = (StorageManager) context .getSystemService(Context.STORAGE_SERVICE);...
分类:移动开发   时间:2015-08-29 09:49:10    阅读次数:188
Android-如何获得当前正在运行的activity的相关信息
ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);     RunningTaskInfo info = manager.getRunningTasks(1).get(0); //获得信息     String shortClassName = info.topActiv...
分类:移动开发   时间:2015-08-28 17:45:53    阅读次数:182
396条   上一页 1 ... 12 13 14 15 16 ... 40 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!