I have a broadcast receiver that is detecting a boot up of the phone. This 
part works fine. What I want to do is send a notification to a broadcast 
receiver in the Main Activity of the app, which is registered in the 
onCreate method as having an intent filter of "RESET_ALARM". This is what 
doesn't seem to be working. I tried starting the application with this 
(found it on stackkoverflow):

Intent i = new Intent(context, MainActivity.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
Intent intent1 = new Intent("RESET_ALARM");
context.sendBroadcast(intent1);

but this does not seem to be working. I know the code is running, but a log 
statement in the receiver in the MainActivity.class file is not logging to 
the logcat. What am I doing wrong?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/948117f7-0e11-41a0-9745-f16e19099d17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to