The fact that the process is still there doesn't mean that the service
is running. Android keeps processes around for perfmance reasons, so
they can be reused when the app is launched again.
Your process shouldn't actually be doing anything anymore after you
stop the service (and if it is, it's a bug in your app).


On Thu, Aug 6, 2009 at 9:38 PM, Archana<[email protected]> wrote:
>
> If We open DDMS.We can See that process is still running eventhough we
> exit from app and  because of this my app getting  hang when i am
> login second time.Now i am manually stopping the service from DDMS.
>
> On Aug 6, 8:06 pm, Marco Nelissen <[email protected]> wrote:
>> What do you mean by the service is still running in the background? What is
>> the return value of your call to stopService() ? How are you determining
>> that it is still running afterwards?
>>
>> On Thu, Aug 6, 2009 at 5:30 AM, Archana <[email protected]> wrote:
>>
>> > Hi ,
>>
>> >  How can we stop Service.I tried put it in both  onstop and ondestroy()
>> > method.While exiting It is calling this method but service still
>> > running background.Whether i am doing anything wrong?
>>
>> > private static Intent serviceIntent ;
>>
>> > protected void onCreate() {
>> > serviceIntent = new Intent(this, LocalService.class);
>> >                startService(serviceIntent);
>> > }
>> > @Override
>> >        protected void onStop() {
>> >                // TODO Auto-generated method stub
>> >                super.onStop();
>> >                Log.e("CallingOnStop", "OnStop");
>> >                stopService(serviceIntent);
>> >        }
>>
>> >       �...@override
>> >        protected void onDestroy() {
>> >                // TODO Auto-generated method stub
>> >                super.onDestroy();
>> >                Log.e("CallingOnDEstroy", "OnDestroy");
>> >                stopService(serviceIntent);
>> >        }
> >
>

--~--~---------~--~----~------------~-------~--~----~
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