If you send a broadcast, and your activity isn't currently running, then
your Broadcast receiver isn't registered with the OS. How could it be? Your
activity hasn't run the code to register itself.  And, furthermore, if
you've done it correctly, when your activity goes away, it should
unregister itself or you will run into problems.

I think you are confusing receivers with intent-filters. I would read
through this before continuing:
http://developer.android.com/guide/components/intents-filters.html

I think what you are TRYING to do is the equivalent of using an intent
filter to implicitly start your activity.  But that is likely overkill.
When you are trying to launch an activity that is part of your own
application, 99% of the time you will want to use an explicit intent to
start the activity.

In both cases, you will want to use the context.startActivity() method...
The difference between implicit and explicit intents is in how you
construct the Intent object.

On Tue, Jan 19, 2016 at 4:02 PM NuffsaidM8 <mcditt...@gmail.com> wrote:

> I did the receiver with only code, that's correct. What do you mean that I
> need to start the activity? I thought that was what I was doing.
>
> --
> 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/dc32640d-926f-4033-9198-5b94e6f4298d%40googlegroups.com
> <https://groups.google.com/d/msgid/android-developers/dc32640d-926f-4033-9198-5b94e6f4298d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAOq06s9nQ0xioMHhowziL9D6RnL-XtFwf%3D554o41o3kvTz%2BB9w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to