1

I've been reading a lot on this subject but for some reason I'm unable to make this work. My application records the location of the user every 5 minutes. When the user reboots the phone I'm unable to auto start the app. I'm able to check the location of the user every 5 minutes so the alarms are working.

Here is my android manifest file

<receiver android:name=".AlarmBroadcastReceiver" ></receiver> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> 

and the AlarmBroadcastReceiver public class AlarmBroadcastReceiver extends BroadcastReceiver{

public void onReceive(Context context, Intent intent) { Log.d("LOG","I've been Called");} 

What I'm doing wrong?

1

1 Answer 1

6

Add:

<intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> </intent-filter> 

To your <receiver> element in the manifest.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.