You are right. It should just be on onPause() and not needed on
OnStop(). My bad...


-
mahesh

On Jun 26, 4:51 pm, RichardC <[email protected]> wrote:
> Why both onPause() and onStop()?  Looking at theapplicationlifecycle
> diagram
>
> http://developer.android.com/images/activity_lifecycle.png
>
> it's not possible to get to onStop() without going through onPause().
>
> If however, you have found this not to be the case, I will have to
> change my programs and also deal with possible exceptions from
> resources being released twice.
>
> Do you have a simple test as I have never seen this (onPause being
> skipped) happen?
>
> /Richard
>
> On 26 June, 17:13, mahesh <[email protected]> wrote:
>
> > And you have to unregister it in your OnPause() and onStop().
>
> > Just as ref if you do not know this already -
> > OnPause() is called when you quit theapplicationvia the back button
> > or start another app.
> > OnStop() is called when it is actually killed (via task manager)
>
> > -
> > maheshhttp://android.maheshdixit.com
>
> > On Jun 25, 2:25 pm, Mark Murphy <[email protected]> wrote:
>
> > > On Fri, Jun 25, 2010 at 5:21 PM, Flamechamp <[email protected]> 
> > > wrote:
> > > > This may sound stupid, but I have a problem with myapplication.
> > > > I made anapplicationto check the accelerometer and orientation
> > > > sensor.
> > > > I tested it on my Nexus One and it works.
> > > > The problem starts when I close it. (I pressed the <- button in the
> > > > phone) When I checked theBatteryusage. That program I made isstill
> > > > there.
>
> > > You also need to be sure to unregister your sensor listeners. If you
> > > do not, your program will not truly end, and you will continue
> > > receiving sensor data.
>
> > > --
> > > Mark Murphy (a Commons 
> > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> > > _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
> > > Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

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