On Wed, Aug 15, 2012 at 12:34 PM, frantz lohier <[email protected]> wrote:
> Question: is there a way to ensure that receiver are programmatically
> registered at run-time are not deallocated when an app goes in background?

IMHO, a better implementation would be to register the receiver in the
manifest, then use PackageManager and setComponentEnabledSetting() to
control when it should and should not receive broadcasts. IMHO, a
receiver registered via registerReceiver() from an activity should
only be used for broadcasts while the activity is in the foreground.

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

_The Busy Coder's Guide to Android Development_ Version 4.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