Indu wrote:
> Can I receive a broadcast event in an activity? I've seen this done in
> broadcast receivers but not in an activity. In particular I would like
> to receive an event when a bluetooth device is found.
> ACTION_DISCOVERY_FINISHED.
> 
> Do I need to declare that in the activity intent filters? Should I be
> using permissions for that? How do I define the callback to handle
> that in the activity when i get receive the action? Any code example
> would be helpful.

You can register a BroadcastReceiver dynamically from an Activity via
registerReceiver().

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

_Beginning Android_ from Apress Now Available!

-- 
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