> My question is that is it possible to add an intent-filter in code,
> for example from a background service? I would like to be able to
> offer the user the ability to share via my activity only if some other
> conditions are met.

You have two choices:

1. Use registerReceiver() in your Service.

2. Still register the receiver via the manifest, and use PackageManager to
enable and disable it as needed.

The former requires an always-running hunk of Android code, which sucks if
you don't need it.

And many thanks to whichever of the Google I/O sessions pointed out the
enable/disable trick!

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



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

Reply via email to