[android-developers] Re: Spurious calls to onPause?

2010-05-11 Thread asher
For whatever it's worth, this continues to happen. It seems to happen
faster and more frequently if I'm running in the debugger, but it
happens fairly often under all circumstances. I've had to move all my
onPause code to onStop, which is not optimal but it's the only thing
that works.

I'm running on Cupcake, and my impression is that Cupcake is simply
not done - there are lots of things that just flat out don't work
(e.g. this problem, RelativeLayout, "route add", Thread.isInterrupted,
etc). In many cases we've debugged into the system code and found the
bugs that cause the problems. Can anyone comment on how true this is
of more current builds?

Thanks,
   Aaron

On Apr 22, 11:08 am, asher  wrote:
> Thanks for responding. OK, this is weird. When I posted the issue
> originally, I believe I was running in a 1.6 emulator, and the
> behavior was 100% consistent. I've tested it a few times since then on
> my hardware (which is a custom device running 1.5), and it's been
> consistent. Today, I tried it in a 1.5 emulator, and it didn't happen
> at all, either in the actual application that originally exhibited the
> problem or in a test app. I tried it on my hardware, and it did
> happen, but then I got distracted for a few minutes, and when I tried
> it again it didn't. At this moment, I can't reproduce it at all under
> any circumstances. I'm confused.
>
> I've since moved all my cleanup code to onClose, which isn't ideal but
> it probably won't hurt anything on this specialized device. I'll keep
> an eye on this, and if it happens again I'll post an update.
>
> Thanks,
>    Aaron
>
> On Apr 16, 7:16 pm, Michael Thomas  wrote:
>
>
>
> > Mark Murphy wrote:
> > > asher wrote:
>
> > >> OK, I should have done this earlier. I created a new Android app in
> > >> Eclipse, added an onPause override in the activity containing nothing
> > >> but a single log message (and the super call), and ran it, and got
> > >> exactly the same behavior. This seems to be either a bug in Android
> > >> (I'm running 1.5), or I'm seriously misunderstanding something about
> > >> the activity lifecycle. Can anyone help? If anyone's actually reading
> > >> this, would you at least respond so I know I'm not shouting in the
> > >> dark here?
>
> > > I cannot reproduce your problem on Android 1.5, Android 1.6, Android
> > > 2.0.1, or Android 2.1 (emulator) or on the DROID (2.1).
>
> > Is it possible that the app is starting with the screen off? This can
> > happen when you
> > load an app from adb/eclipse. If you loaded the app in that situation,
> > I'd sort of expect
> > that you'd see the resume followed by pause behavior, but it's only a guess.
>
> > Mike
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Spurious calls to onPause?

2010-04-22 Thread asher
Thanks for responding. OK, this is weird. When I posted the issue
originally, I believe I was running in a 1.6 emulator, and the
behavior was 100% consistent. I've tested it a few times since then on
my hardware (which is a custom device running 1.5), and it's been
consistent. Today, I tried it in a 1.5 emulator, and it didn't happen
at all, either in the actual application that originally exhibited the
problem or in a test app. I tried it on my hardware, and it did
happen, but then I got distracted for a few minutes, and when I tried
it again it didn't. At this moment, I can't reproduce it at all under
any circumstances. I'm confused.

I've since moved all my cleanup code to onClose, which isn't ideal but
it probably won't hurt anything on this specialized device. I'll keep
an eye on this, and if it happens again I'll post an update.

Thanks,
   Aaron

On Apr 16, 7:16 pm, Michael Thomas  wrote:
> Mark Murphy wrote:
> > asher wrote:
>
> >> OK, I should have done this earlier. I created a new Android app in
> >> Eclipse, added an onPause override in the activity containing nothing
> >> but a single log message (and the super call), and ran it, and got
> >> exactly the same behavior. This seems to be either a bug in Android
> >> (I'm running 1.5), or I'm seriously misunderstanding something about
> >> the activity lifecycle. Can anyone help? If anyone's actually reading
> >> this, would you at least respond so I know I'm not shouting in the
> >> dark here?
>
> > I cannot reproduce your problem on Android 1.5, Android 1.6, Android
> > 2.0.1, or Android 2.1 (emulator) or on the DROID (2.1).
>
> Is it possible that the app is starting with the screen off? This can
> happen when you
> load an app from adb/eclipse. If you loaded the app in that situation,
> I'd sort of expect
> that you'd see the resume followed by pause behavior, but it's only a guess.
>
> Mike
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Spurious calls to onPause?

2010-04-16 Thread Michael Thomas

Mark Murphy wrote:

asher wrote:
  

OK, I should have done this earlier. I created a new Android app in
Eclipse, added an onPause override in the activity containing nothing
but a single log message (and the super call), and ran it, and got
exactly the same behavior. This seems to be either a bug in Android
(I'm running 1.5), or I'm seriously misunderstanding something about
the activity lifecycle. Can anyone help? If anyone's actually reading
this, would you at least respond so I know I'm not shouting in the
dark here?



I cannot reproduce your problem on Android 1.5, Android 1.6, Android
2.0.1, or Android 2.1 (emulator) or on the DROID (2.1).
  


Is it possible that the app is starting with the screen off? This can 
happen when you
load an app from adb/eclipse. If you loaded the app in that situation, 
I'd sort of expect

that you'd see the resume followed by pause behavior, but it's only a guess.

Mike

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Spurious calls to onPause?

2010-04-16 Thread abisai rangel
Want to get the phone for free click here

dont wait till supplys fly.
On Fri, Apr 16, 2010 at 11:38 AM, Mark Murphy wrote:

> asher wrote:
> > OK, I should have done this earlier. I created a new Android app in
> > Eclipse, added an onPause override in the activity containing nothing
> > but a single log message (and the super call), and ran it, and got
> > exactly the same behavior. This seems to be either a bug in Android
> > (I'm running 1.5), or I'm seriously misunderstanding something about
> > the activity lifecycle. Can anyone help? If anyone's actually reading
> > this, would you at least respond so I know I'm not shouting in the
> > dark here?
>
> I cannot reproduce your problem on Android 1.5, Android 1.6, Android
> 2.0.1, or Android 2.1 (emulator) or on the DROID (2.1).
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Android App Developer Books: http://commonsware.com/books
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Spurious calls to onPause?

2010-04-16 Thread ~ TreKing
On Fri, Apr 16, 2010 at 1:16 PM, asher  wrote:

> Can anyone help? If anyone's actually reading this, would you at least
> respond so I know I'm not shouting in the dark here?
>

Sorry, no idea what to tell you besides maybe override every other lifecycle
function (onStop, onStart, etc) and see what order they're called in, if at
all.

Did you put a breakpoint in onPause when that happens to see what the
callstack is like at that point?

I assume you're not doing anything special in onCreate that would cause this
right (like starting another activity?)

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Spurious calls to onPause?

2010-04-16 Thread Mark Murphy
asher wrote:
> OK, I should have done this earlier. I created a new Android app in
> Eclipse, added an onPause override in the activity containing nothing
> but a single log message (and the super call), and ran it, and got
> exactly the same behavior. This seems to be either a bug in Android
> (I'm running 1.5), or I'm seriously misunderstanding something about
> the activity lifecycle. Can anyone help? If anyone's actually reading
> this, would you at least respond so I know I'm not shouting in the
> dark here?

I cannot reproduce your problem on Android 1.5, Android 1.6, Android
2.0.1, or Android 2.1 (emulator) or on the DROID (2.1).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Spurious calls to onPause?

2010-04-16 Thread asher
OK, I should have done this earlier. I created a new Android app in
Eclipse, added an onPause override in the activity containing nothing
but a single log message (and the super call), and ran it, and got
exactly the same behavior. This seems to be either a bug in Android
(I'm running 1.5), or I'm seriously misunderstanding something about
the activity lifecycle. Can anyone help? If anyone's actually reading
this, would you at least respond so I know I'm not shouting in the
dark here?

Aaron

On Apr 16, 2:00 pm, asher  wrote:
> Nobody's seen anything like this? I'm to the point where I'm just
> disabling big chunks of my app to see if I can get the behavior to go
> away, but while it's there it's preventing me from implementing
> onPause in any useful way.
>
> Incidentally, I tracked down the ParseCommandEcho line and it's not
> relevant.
>
> Aaron
>
> On Apr 12, 3:27 pm, asher  wrote:
>
>
>
> > One other bit of information: the activity is not actually paused. If
> > I disable my onPause method, the activity stays frontmost and appears
> > interactive (though I don't have much going on at the moment, so it's
> > a bit hard to tell).
>
> > Aaron
>
> > On Apr 12, 3:24 pm, asher  wrote:
>
> > > I have a relatively simple application with only one activity (in use,
> > > anyway). When I launch it, my activity gets the following sequence of
> > > calls: onCreate, onResume, onPause. This happens with no user input
> > > whatsoever. What's going on with that onPause? The only clue that I
> > > have is a line in the log immediately prior to the call to onPause:
>
> > > 01-03 23:43:43.499: WARN/System.err(1534): ParseCommandEcho: Setting
> > > state to COMMAND_END
>
> > > Does that mean something to somebody?
>
> > > Thanks,
> > >     Aaron
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Spurious calls to onPause?

2010-04-16 Thread asher
Nobody's seen anything like this? I'm to the point where I'm just
disabling big chunks of my app to see if I can get the behavior to go
away, but while it's there it's preventing me from implementing
onPause in any useful way.

Incidentally, I tracked down the ParseCommandEcho line and it's not
relevant.

Aaron

On Apr 12, 3:27 pm, asher  wrote:
> One other bit of information: the activity is not actually paused. If
> I disable my onPause method, the activity stays frontmost and appears
> interactive (though I don't have much going on at the moment, so it's
> a bit hard to tell).
>
> Aaron
>
> On Apr 12, 3:24 pm, asher  wrote:
>
> > I have a relatively simple application with only one activity (in use,
> > anyway). When I launch it, my activity gets the following sequence of
> > calls: onCreate, onResume, onPause. This happens with no user input
> > whatsoever. What's going on with that onPause? The only clue that I
> > have is a line in the log immediately prior to the call to onPause:
>
> > 01-03 23:43:43.499: WARN/System.err(1534): ParseCommandEcho: Setting
> > state to COMMAND_END
>
> > Does that mean something to somebody?
>
> > Thanks,
> >     Aaron

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Spurious calls to onPause?

2010-04-12 Thread asher
One other bit of information: the activity is not actually paused. If
I disable my onPause method, the activity stays frontmost and appears
interactive (though I don't have much going on at the moment, so it's
a bit hard to tell).

Aaron

On Apr 12, 3:24 pm, asher  wrote:
> I have a relatively simple application with only one activity (in use,
> anyway). When I launch it, my activity gets the following sequence of
> calls: onCreate, onResume, onPause. This happens with no user input
> whatsoever. What's going on with that onPause? The only clue that I
> have is a line in the log immediately prior to the call to onPause:
>
> 01-03 23:43:43.499: WARN/System.err(1534): ParseCommandEcho: Setting
> state to COMMAND_END
>
> Does that mean something to somebody?
>
> Thanks,
>     Aaron

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.