============问题描述============ 怎么设置振动的参数可以使振动强大变大,像系统来电时那样。 mVibrator01=(Vibrator)getApplication().getSystemService(Service.VIBRATOR_SERVICE); mVibrator...
分类:
移动开发 时间:
2014-10-20 22:47:24
阅读次数:
162
提供wifi管理的各种主要API,主要包含wifi的扫描,建立连接,配置等获取WifiManagerWifiManager wm = (WifiManager) this.getSystemService(Context.WIFI_SERVICE);设置wifi功能开启bRet = wifiMana...
分类:
其他好文 时间:
2014-10-20 14:59:30
阅读次数:
1263
/**
* 判断移动网络是否开启
*
* @param context
* @return
*/
public static boolean isNetEnabled(Context context) {
TelephonyManager tm = (TelephonyManager) context
.getSystemService(Context.TELE...
分类:
移动开发 时间:
2014-10-19 11:35:58
阅读次数:
620
Android 更新模块 自定义Update
写这个总结是因为遇到个Android系统兼容的BUG
Android项目原本使用的是API提供的下载方法
如下:
DownloadManager downloadManager = (DownloadManager) getSystemService(Activity.DOWNLOAD_SERVICE);
DownloadManager.Request request = new Request(Uri.parse(dl));
...
分类:
移动开发 时间:
2014-10-15 14:27:30
阅读次数:
276
最近项目中用到了wifi模块,今天做一个简单的总结。
参考:http://www.2cto.com/kf/201310/253617.html
1.怎样获取wifi对象并进行操作
要操作WIFI设备,需要先获取Context.getSystemService(Context.WIFI_SERVICE)来获取WifiManager对象,并通过这个对象来管理WIFI设备。
...
分类:
移动开发 时间:
2014-10-11 20:57:57
阅读次数:
331
关于收起虚拟键盘,网上能找到的大多是这个:InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);imm.hideSoftInputFromWindow(editText...
分类:
移动开发 时间:
2014-10-11 20:29:06
阅读次数:
190
android获取屏幕的高度和宽度用到WindowManager这个类,两种方法: 1、WindowManager wm = (WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE);int width = wm.ge...
分类:
移动开发 时间:
2014-10-10 21:01:54
阅读次数:
166
1 public abstract Object getSystemService(String name); 2 3 /** 4 * Use with {@link #getSystemService} to retrieve a 5 * {@li...
分类:
移动开发 时间:
2014-10-09 15:12:23
阅读次数:
672
1、方法一(如果输入法在窗口上已经显示,则隐藏,反之则显示)[java] view plaincopyInputMethodManagerimm=(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);imm.toggle...
分类:
移动开发 时间:
2014-10-01 18:33:01
阅读次数:
179
1、隐藏软键盘1 private void hideSoftInput(){2 // 隐藏软键盘3 InputMethodManager inputManager = (InputMethodManager) getActivity().getSystemService(Context.INPUT_...
分类:
其他好文 时间:
2014-09-29 20:00:52
阅读次数:
159