1.凡是廣播必須是要到androidmainfest中配置資訊的
-->類的全路徑
-->設定的是接收什麼樣的廣播,根據實現的功能而定
public
class
extends
broadcastreceiver if(
"android.intent.action.package_replaced"
.equals(action)) if(
"android.intent.action.package_removed"
.equals(action))
} }
其他一眼明了
* @author abc**/
public
class
sdstatusreceiver
extends
broadcastreceiver if(
"android.intent.action.media_removed"
.equals(action)) if(
"android.intent.action.media_unmounted"
.equals(action))
} }
public
class
smsreceiver
extends
broadcastreceiver
system.out.println(sms.getmessagebody());
} }
} public
class
mainactivity
extends
activity
/*** 思路:1.將edittext的字元提取出來
* 2.建立乙個sharedpreferences的儲存物件
* 3.將字串儲存進去(儲存的順序是先獲得edit(),然後putstring)
* 4.編輯,提交
* @param v
*/public
void
click(view v)
} public
class
callreceive
extends
broadcastreceiver
} 同樣要在androidmainfest配置資訊(在系統預設的之後)
"font-size:12px;"
> ".callreceive"
>
"android.intent.action.new_outgoing_call"
/>
scrapy redis元件配置用例
dupefilter class scrapy redis.dupefilter.rfpdupefilter from scrapy redis.scheduler import scheduler from scrapy redis.queue import priorityqueue sched...
MySQL 配置優化幾例
1 當寫入時,使用 innodb flush method o direct 來避免雙緩衝。2.避免使用 o direct 和 ext3 檔案系統 你將序列化所有要寫入的。3.分配足夠的 innodb buffer pool size 來載入整個 innodb 檔案到記憶體中 少從磁碟中讀取。4.不...
scrapy redis元件配置用例
dupefilter class scrapy redis.dupefilter.rfpdupefilter from scrapy redis.scheduler import scheduler from scrapy redis.queue import priorityqueue sched...