Repeatedly binding and unbinding works fine in the local service sample
(which you can test by pressing the buttons), so my first question would be
what you are doing different than it.  Likewise you can see that if you bind
the service, then go to the other local service sample, you are still able
to start the service there.

On Tue, Jan 13, 2009 at 5:00 AM, Abraham
<abraham_thamarapal...@yahoo.co.in>wrote:

>
> HI All,
>
> I'm facing an issue with my application & need your expert opinion in
> resolving the issue.
>
> My app has a local service which is started by calling startService()
> when the phone boot up is complete.  My app also has a UI component
> which the user can use for making use of the service. Following the
> Local service binding example in ApiDemos my app is calling bindService
> () api to bind with the local service & make use of the local service
> instance obtained through the IBinder in onServiceConnected() to
> perform operations provided by the service. Once the operation is
> completed my app calls unbindService() to disconnect the UI from the
> service. From this point on my app cannot communicate with the local
> service by calling bindService() or startService().
>
> Has anyone faced similar issues. If yes, what is the work around. Am I
> doing something wrong.
>
> Another observation is that if I donot call unbindService() I'm able
> to make use of the operations provided by the service, although it
> leads to memory leaks ( as displayed in the logs) .
>
> Looking forward your response. Thanx in advance.
> >
>


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

Reply via email to