On Fri, Jul 15, 2011 at 2:17 AM, <Hera> <aide...@gmail.com> wrote: > Thanks Mark, I no sure about the difference between registering the > event on the activity or registering it on the application context, can > ´t I pass the broadcastReceiver object thought > onRetainNonConfigurationInstance() if I made it on the activity?
No, because you will leak the old activity. > Another problem would be what happends if I have another listener > (i.e. GPS location update listenes) in the same activity, with this > solution is not posible to pass 2 different objects(listeners) to the > onRetainNonConfigurationInstance, any solution? Return something that holds both the receiver and the listener. I have used a static inner class named State for situations like that. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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