Try:

mTelephonyManager.listen(mMGPhoneListener,PhoneStateListener.LISTEN_NONE);

On Thu, Jul 23, 2009 at 10:43 AM, Ne0 <[email protected]>wrote:

>
> Hi,
>
> I have written a small activity to listen to and make a sound when the
> LAC changes, i did this with:
>
> mTelephonyManager.listen
> (mMGPhoneListener,PhoneStateListener.LISTEN_CELL_LOCATION);
>
> All works fine, until i hit my stop button, which calls finish(). My
> understanding is that the activity should be destroyed from this call.
> The activity appears to close, though my listener still alarms when
> there is a LAC change. It seems to carry on running indefinitely, i
> have tried a few things to no avail.
>
> I have tried to remove the listener by adding a fake one that does
> nothing but overwrite the old one, before i call finish though this
> does not work either.
>
> Am i misunderstanding the Activity life cycle?
>
> Liam
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to