I have implemented Broadcast Receiver
in a library
project for checking the Boot Completed
event , but it is not working.
Broadcast Receiver Class :
public class Reciever extends BroadcastReceiver
{
public void onReceive(Context context, Intent intent)
{
if(intent.getAction().equals("android.intent.action.BOOT_COMPLETED"))
{
Toast.makeText(context, "Device Boot Completed", Toast.LENGTH_LONG).show();
}
}
}
AndroidManifest.xml :
<receiver
android:name=".Reciever"
android:enabled="true" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
I implemented same Receiver in another application (not library project) and it is working fine.