码迷,mamicode.com
首页 >  
搜索关键字:getsystemservice    ( 396个结果
wakelock
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);通过 Context.getSystemService().方法获取PowerManager实例。 然后通过PowerManager的newWakeLoc
分类:其他好文   时间:2016-02-17 10:54:23    阅读次数:433
Android手机联网状态、GPS
一、判断网络连接是否可用public static boolean isNetworkAvailable(Context context) { ConnectivityManager cm = (ConnectivityManager) context .getSystemService(Conte
分类:移动开发   时间:2016-02-01 14:59:37    阅读次数:178
获取手机CCID号
TelephonyManager tm = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE); String imei = tm.getDeviceId(); //取出IMEI String tel = tm.ge
分类:移动开发   时间:2016-01-27 19:31:30    阅读次数:290
android获取手机屏幕的宽度及高度
WindowManagerwm=(WindowManager)context.getSystemService(Context.WINDOW_SERVICE);DisplayMetricsoutMetrics=newDisplayMetrics();wm.getDefaultDisplay().getMetrics(outMetrics);intmScreenWidth=outMetrics.widthPixels;//屏幕的宽度intmScreenHeight=outMetrics.heightP..
分类:移动开发   时间:2016-01-26 18:49:00    阅读次数:253
android如何调用显示和隐藏系统默认的输入法(一)
1.调用显示系统默认的输入法方法一、InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);imm.showSoftInput(m_receiverView(接受软键盘输...
分类:移动开发   时间:2016-01-24 18:13:49    阅读次数:171
android wifi讲解 wifi列表显示
1.怎样获取wifi对象并进行操作要操作WIFI设备,需要先获取Context.getSystemService(Context.WIFI_SERVICE)来获取WifiManager对象,并通过这个对象来管理WIFI设备。addNetwork(WifiConfiguration config) 添...
分类:移动开发   时间:2016-01-19 12:17:04    阅读次数:277
关于WifiManager的一些看法
因为今天做项目的时候用到了,做下笔记WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);//实例化WifiManager当我需要对wifi列表进行实时监控的时候List list = wifiM...
分类:其他好文   时间:2016-01-06 17:32:48    阅读次数:124
显示和隐藏输入法
显示输入法:imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);imm.showSoftInput(mEt, InputMethodManager.SHOW_FORCED);实际使用时发现没用,但是使用v...
分类:其他好文   时间:2015-12-30 17:13:28    阅读次数:130
android 获取屏幕款高度
//获取屏幕的宽度public static int getScreenWidth(Context context) {WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);D...
分类:移动开发   时间:2015-12-29 12:58:19    阅读次数:182
安卓开发之传感器
和前面的位置服务基本一致的配置方法:SensorManager senserManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE);Sensor sensor = senserManager.getDefaultSensor...
分类:移动开发   时间:2015-12-21 18:12:30    阅读次数:173
396条   上一页 1 ... 9 10 11 12 13 ... 40 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!