各位好!
关于Android手机重启的代码,网上已经很全了。Intent i = new Intent(Intent.ACTION_REBOOT);
i.putExtra("nowait", 1);
i.putExtra("interval", 1);
i.putExtra("window", 0);
sendBroadcast(i); 但对putExtra中的参数说明较少,请问nowait, interval, window这三个参数的具体含义是什么呢?谢谢!
关于Android手机重启的代码,网上已经很全了。Intent i = new Intent(Intent.ACTION_REBOOT);
i.putExtra("nowait", 1);
i.putExtra("interval", 1);
i.putExtra("window", 0);
sendBroadcast(i); 但对putExtra中的参数说明较少,请问nowait, interval, window这三个参数的具体含义是什么呢?谢谢!
解决方案 »
- 安卓虚拟机,文件导入sdcard上报错,Read-only file system
- 根据系统当前的日期,返回当前星期的星期一的日期和星期日日期
- 让自定义View中的onDraw方法不重复执行
- 【myeclipse 7+android sdk 2.1】 no target available。。。
- android在2.2下如何退出?
- android怎么成功调用自己写的jar包
- 有关Android相机实时处理的问题
- android 通过jni调用gsoap问题
- 百度地图开发
- 请教如何得知相关权限被用户关闭了?
- Android 编程时出现build path错误~~新手求解
- Android,线性布局背景色问题,请高手解决
PS 一般应用没权先发这个intent的
interval :if a reboot has been requested
window:if a specific window has been requested
有详细介绍的连接吗?谢谢!
mReqRebootInterval = intent.getIntExtra("interval", -1);
mReqRebootStartTime = intent.getIntExtra("startTime", -1);
mReqRebootWindow = intent.getIntExtra("window", -1);
mReqMinScreenOff = intent.getIntExtra("minScreenOff", -1);
mReqMinNextAlarm = intent.getIntExtra("minNextAlarm", -1);
mReqRecheckInterval = intent.getIntExtra("recheckInterval", -1);看了下一共读取了以上的extras,代码里面解释如下 boolean mReqRebootNoWait; // should wait for one interval before reboot?
int mReqRebootInterval = -1; // >= 0 if a reboot has been requested
int mReqRebootStartTime = -1; // >= 0 if a specific start time has been requested
int mReqRebootWindow = -1; // >= 0 if a specific window has been requested
int mReqMinScreenOff = -1; // >= 0 if a specific screen off time has been requested
int mReqMinNextAlarm = -1; // >= 0 if specific time to next alarm has been requested
int mReqRecheckInterval= -1; // >= 0 if a specific recheck interval has been requested