1, commnad文件:
--update_package=/sdcard/dload/update.zip
实际需改成你下载的包的位置
2, command写到
/cache/recovery/下面
3,执行参数STring recovery的reboot
((PowerManager)getSystemService("power")).reboot("r...
分类:
其他好文 时间:
2015-03-14 17:02:44
阅读次数:
281
Service:private NotificationManager manager;manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); private void showNotifi...
分类:
移动开发 时间:
2015-03-12 19:04:53
阅读次数:
132
Vibrator是安卓提供的震动器,其没有构造器,通过getSystemService(Context.VIBRATOR_SERVICE)方法获取对象。但使用此类时需要在清单文件中添加访问权限android.permission.VIBRATE.在实际使用可以设置震动周期已经访问时间package ...
分类:
移动开发 时间:
2015-03-06 15:40:11
阅读次数:
163
关键代码:TelephonyManager tm = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE); String imei = tm.getDeviceId(); //取出IMEI String ...
分类:
其他好文 时间:
2015-03-06 12:20:48
阅读次数:
253
在Android的主Activity的初始化函数中添加:TelephonyManager tm = (TelephonyManager) this .getSystemService(TELEPHONY_SERVICE); SubscriberId = tm.getSubscriberId(...
分类:
移动开发 时间:
2015-03-06 10:00:11
阅读次数:
170
ConnectivityManager主要管理和网络连接相关的操作,通过getSystemService(Context.CONNECTIVITY_SERVICE)获
取网络连接的服务。因此我们可以通过ConnectivityManager这个类下的getActiveNetworkInfo()方法来获取当前的网络
连接状态,这个方法返回的是NetworkInfo对象,
Ne...
分类:
移动开发 时间:
2015-03-04 13:02:58
阅读次数:
141
PowerService系统服务提供了唤醒设备的方法:PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);pm.wakeUp(SystemClock.uptimeMillis())其中wa...
分类:
移动开发 时间:
2015-03-03 13:33:23
阅读次数:
221
当我们要使用android的系统服务时,一般都是使用Context.getSystemService方法。例如我们要获取AudioManager,我们可以: AudioManager?am?=?(AudioManager)?getSystemService(Context.AUDIO_SERVIC...
分类:
其他好文 时间:
2015-02-23 14:21:28
阅读次数:
185
Android 判断app是否在前台还是在后台运行,直接看代码,可直接使用。
public static boolean isBackground(Context context) {
ActivityManager activityManager = (ActivityManager) context
.getSystemService(Context.ACTIVITY_SERVI...
分类:
移动开发 时间:
2015-02-14 17:31:29
阅读次数:
154
ActivityManager am = (ActivityManager) this .getSystemService(ACTIVITY_SERVICE); List taskInfo = am.getRunningTasks(1); ComponentName componentInfo .....
分类:
移动开发 时间:
2015-02-12 10:29:30
阅读次数:
166