Startup Broadcast Receiver Not Running At Startup
Posted
by
comead
on Stack Overflow
See other posts from Stack Overflow
or by comead
Published on 2012-03-21T17:26:50Z
Indexed on
2012/03/21
17:29 UTC
Read the original article
Hit count: 516
I have a class StartupReceiver:
public class StartupReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Intent service = new Intent(context, ARMRService.class);
context.startService(service);
}
and it is declared in my Manifest.xml as
<receiver android:name=".StartupReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
and I have given the correct permission:
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
Why is this not working???
© Stack Overflow or respective owner