There's more to it than onStop(). Check out onPause(), or better yet,
revisit the documentation on the Activity model.
So you get  sense of the dynamic, override all activity methods, place
logs in them and play around so you get a feel which method gets
called when.



On Feb 4, 6:14 am, Abhi <[email protected]> wrote:
> I have an app where the accelerometer runs in the background and
> continues to read values from the sensor even after the activity
> exits.
>
> Here is how I am trying to stop it
>
>                     @Override
>             protected void onStop()
>             {
>              mSensorManager.unregisterListener(mSensorListener, mySensor);
>              super.onStop();
>
>              }
>
> Am I doing it wrong?
>
> Abhi

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