Saturday, June 11, 2011

[android-developers] Re: Bind to Service in Fragment

I attached sample code to the bug entry. The behavior will be evident
in the logs.

On May 16, 1:20 pm, Dianne Hackborn <hack...@android.com> wrote:
> The lifecycle callbacks need to work correctly.  If there is a case where
> they aren't, it needs to be fixed.  I haven't had a chance to investigate
> that bug (no sample code == much more time to look in to).
>
>
>
>
>
>
>
>
>
> On Mon, May 16, 2011 at 7:53 PM, goosedroid <alexrhel...@gmail.com> wrote:
> > Thanks Dianne,
>
> > I typically bind to services in Activity.onStart() and unbind in
> > Activity.onStop(). However, as I noted in the link above, the
> > equivalent callbacks for Fragments (Fragment.onStart() &
> > Fragment.onStop()) do not appear to be working correctly. I imagine I
> > will have to wait for a fix to the ACL?
>
> > On May 13, 5:50 pm, Dianne Hackborn <hack...@android.com> wrote:
> > > It is the same as with an activity.
>
> > > On Fri, May 13, 2011 at 9:29 PM, goosedroid <alexrhel...@gmail.com>
> > wrote:
> > > > Hello,
>
> > > > I was wondering what the best place to bind / unbind to a service in a
> > > > Fragment is. I am using the compatibility library, and revision 1
> > > > (v4?) has an issue with onStart/onStop.
>
> > > >http://code.google.com/p/android/issues/detail?id=16490
>
> > > > Perhaps there is a workaround or a better lifecycle callback to bind/
> > > > unBind that someone can share.
>
> > > > Thanks
>
> > > > --
> > > > 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+unsubscribe@googlegroups.com
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > hack...@android.com
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support, and so won't reply to such e-mails.  All such
> > > questions should be posted on public forums, where I and others can see
> > and
> > > answer them.
>
> > --
> > 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+unsubscribe@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment