我嘗試過所有其他的stackoverflow答案,但沒有奏效。背景broadcastreciever不啓動
在manifast XML <receiver android:label="BGTasksBroadcast" android:name=".BGTasksBroadcast"> <intent-filter> <action android:name="android.intent.action.SCREEN_ON" /> <action android:name="android.intent.action.REBOOT" /> </intent-filter> </receiver>
在廣播reciever:
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
Log.d("Log", "BROADCAST RECIEVER ");
}
當我啓動的應用程序我沒有看到日誌 「BROADCAST RECIEVER」。
我需要在後臺調用服務。所以我使用廣播接收器來調用它。但我沒有看到廣播接收器中放置任何日誌。我dono如何調試這個 – Cintu 2011-12-30 13:07:22