I believe when I had been running across handling sensor inputs there was always the finish( ) functionality included in my onStop( ) in order to finalize the end of the Activity. Of course there will always be a provider for the Android sensors out there that the system is supplying. Not sure if you areOrCould disable the provided service at the system level.
~ JFrog "Debugging something is twice as hard as coding something the first time. Therefore, if we write something as cleverly as possible, then we are by definition not smart enough to debug it." On Feb 4, 10:12 am, JP <[email protected]> wrote: > 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- Hide quoted text - > > - Show quoted text - -- 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

