On Mon, Nov 1, 2010 at 3:32 PM, longingtoadopt.com <anil.r...@gmail.com> wrote:
> Why is there no registerReceiver(BroadcastReceiver) call?

Because it would be totally meaningless.

> The API call
> requires an IntentFilter also.

All broadcast receivers, whether registered via registerReceiver() or
via the manifest, need an Intent filter to stipulate what broadcasts
they are listening to.

> Is the API not in sync with what can be
> specified through the manifest? (IntentFilter not mandatory there).

While the <intent-filter> may not be technically mandatory there,
having a <receiver> element with no <intent-filter> is pointless,
since the BroadcastReceiver will never be used.

> Anyway, I am not able to get the alert happen with explicitly
> specifying the component.

You failed to make your inner class be static. You cannot reference
non-static inner classes in the manifest, because Android has no way
of creating an instance of that non-static inner class.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android 2.2 Programming Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to