當前位置:名人名言大全網 - 端午節短信 - android可以在服務中發送廣播嗎?能給我詳細介紹壹下嗎?謝謝妳

android可以在服務中發送廣播嗎?能給我詳細介紹壹下嗎?謝謝妳

sendBroadcast的方法是在ContextWrapper中定義的,Service繼承了ContextWrapper。

@覆蓋

公共void發送廣播(意圖意圖){

mBase.sendBroadcast(意圖);

}

發的時候直接打電話。

send broadcast(new Intent(" com . mars lei . send _ broadcast _ in _ service "));