Re: [android-developers] Program crashes on Android 4.0.4 but not on 2.3.3

2012-04-15 Thread James Black
The Activity just disappears.

So, if I am on the home page, then I start my application, I get the first
screen, then the second activity comes up, starts the remote service, and
then I end up on the home page again, as the second activity ended.

But, the exact same program works fine on Android 2.3.3.

Unfortunately I have no other information than what I am seeing.

I don't get any logging from onStop or onDestroy, but that may be expected,
so I am not certain how to tell if it went through there, are, as I fear,
it was killed and doesn't go through the lifecycle steps in this case.

On Sun, Apr 15, 2012 at 1:29 AM, TreKing treking...@gmail.com wrote:

 On Sat, Apr 14, 2012 at 11:06 PM, James Black planiturth...@gmail.comwrote:

 Almost immediately after binding to and calling onStart on the service
 the mapview activity dies.


 Can you elaborate on dies?


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

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




-- 
I know that you believe you understand what you think I said, but I'm not
sure you realize that what you heard is not what I meant.
- Robert McCloskey

-- 
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] Program crashes on Android 4.0.4 but not on 2.3.3

2012-04-15 Thread Farhan Tariq
Are you using 'startActivityForResult()' method in your code to start the
new activity?

On Sun, Apr 15, 2012 at 5:27 PM, James Black planiturth...@gmail.comwrote:

 The Activity just disappears.

 So, if I am on the home page, then I start my application, I get the first
 screen, then the second activity comes up, starts the remote service, and
 then I end up on the home page again, as the second activity ended.

 But, the exact same program works fine on Android 2.3.3.

 Unfortunately I have no other information than what I am seeing.

 I don't get any logging from onStop or onDestroy, but that may be
 expected, so I am not certain how to tell if it went through there, are, as
 I fear, it was killed and doesn't go through the lifecycle steps in this
 case.

 On Sun, Apr 15, 2012 at 1:29 AM, TreKing treking...@gmail.com wrote:

 On Sat, Apr 14, 2012 at 11:06 PM, James Black planiturth...@gmail.comwrote:

 Almost immediately after binding to and calling onStart on the service
 the mapview activity dies.


 Can you elaborate on dies?


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

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




 --
 I know that you believe you understand what you think I said, but I'm not
 sure you realize that what you heard is not what I meant.
 - Robert McCloskey

 --
 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] Program crashes on Android 4.0.4 but not on 2.3.3

2012-04-15 Thread James Black
I have it working, at the moment, by having this in my manifest:
uses-sdk
android:minSdkVersion=7
android:targetSdkVersion=9 /

So targeting SDK 11 or 18 leads to it to crash.

And no, I just use
startActivity(intent);

with these flags:
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP
| Intent.FLAG_ACTIVITY_CLEAR_TOP);

On Sun, Apr 15, 2012 at 8:30 AM, Farhan Tariq farhan@gmail.com wrote:

 Are you using 'startActivityForResult()' method in your code to start the
 new activity?


 On Sun, Apr 15, 2012 at 5:27 PM, James Black planiturth...@gmail.comwrote:

 The Activity just disappears.

 So, if I am on the home page, then I start my application, I get the
 first screen, then the second activity comes up, starts the remote service,
 and then I end up on the home page again, as the second activity ended.

 But, the exact same program works fine on Android 2.3.3.

 Unfortunately I have no other information than what I am seeing.

 I don't get any logging from onStop or onDestroy, but that may be
 expected, so I am not certain how to tell if it went through there, are, as
 I fear, it was killed and doesn't go through the lifecycle steps in this
 case.

 On Sun, Apr 15, 2012 at 1:29 AM, TreKing treking...@gmail.com wrote:

 On Sat, Apr 14, 2012 at 11:06 PM, James Black 
 planiturth...@gmail.comwrote:

 Almost immediately after binding to and calling onStart on the service
 the mapview activity dies.


 Can you elaborate on dies?


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

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




 --
 I know that you believe you understand what you think I said, but I'm
 not sure you realize that what you heard is not what I meant.
 - Robert McCloskey

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




-- 
I know that you believe you understand what you think I said, but I'm not
sure you realize that what you heard is not what I meant.
- Robert McCloskey

-- 
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] Program crashes on Android 4.0.4 but not on 2.3.3

2012-04-15 Thread Mark Murphy
On Sun, Apr 15, 2012 at 8:45 AM, James Black planiturth...@gmail.com wrote:
 I have it working, at the moment, by having this in my manifest:
     uses-sdk
         android:minSdkVersion=7
         android:targetSdkVersion=9 /

 So targeting SDK 11 or 18 leads to it to crash.

 And no, I just use
 startActivity(intent);

 with these flags:
 intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP
 | Intent.FLAG_ACTIVITY_CLEAR_TOP);

Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine
LogCat and look at the stack trace associated with your crash.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.5
Available!

-- 
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] Program crashes on Android 4.0.4 but not on 2.3.3

2012-04-15 Thread James Black
That is the problem, with logcat there is no additional information.

I have it attached to my computer through the usb connection, and am able
to see all the data in logcat.

That is why I decided to ask for help in how to approach it, as I am
confused as to what is going on.

Here is what I see when it dies:
04-15 08:50:02.213: I/ErrandMapActivity(5805): onServiceConnected
04-15 08:50:02.213: I/ErrandMapActivity(5805): registering callback
04-15 08:50:02.213: I/ErrandAssistantService(5931): registerCallback
04-15 08:50:02.217: I/ErrandMapActivity(5805): onResume - binding succeeded

OK, then I see this, which may explain it:
04-15 08:50:08.682: D/CDA(5805): onBackPressed Called
04-15 08:50:08.682: D/CustomMapActivity(5805): finish entered

And, when I look much further in the log I found onStop and onDestroy,
being logged, which makes me feel better.

So, now it appears that the phone thinks the back button is being pressed
when it is sitting untouched, but only if the SDK version is  9.

On Sun, Apr 15, 2012 at 8:48 AM, Mark Murphy mmur...@commonsware.comwrote:

 On Sun, Apr 15, 2012 at 8:45 AM, James Black planiturth...@gmail.com
 wrote:
  I have it working, at the moment, by having this in my manifest:
  uses-sdk
  android:minSdkVersion=7
  android:targetSdkVersion=9 /
 
  So targeting SDK 11 or 18 leads to it to crash.
 
  And no, I just use
  startActivity(intent);
 
  with these flags:
  intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP
  | Intent.FLAG_ACTIVITY_CLEAR_TOP);

 Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine
 LogCat and look at the stack trace associated with your crash.

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.5
 Available!

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




-- 
I know that you believe you understand what you think I said, but I'm not
sure you realize that what you heard is not what I meant.
- Robert McCloskey

-- 
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] Program crashes on Android 4.0.4 but not on 2.3.3

2012-04-15 Thread Mark Murphy
On Sun, Apr 15, 2012 at 9:02 AM, James Black planiturth...@gmail.com wrote:
 That is the problem, with logcat there is no additional information.

Then it is not crashing.

 OK, then I see this, which may explain it:
 04-15 08:50:08.682: D/CDA(5805): onBackPressed Called
 04-15 08:50:08.682: D/CustomMapActivity(5805): finish entered

 And, when I look much further in the log I found onStop and onDestroy, being
 logged, which makes me feel better.

 So, now it appears that the phone thinks the back button is being pressed
 when it is sitting untouched, but only if the SDK version is  9.

I assume that CDA is your code. If so, set a breakpoint or throw a
RuntimeException in onBackPressed() to see if there is something in
the call trace that indicates what is triggering it.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.5
Available!

-- 
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] Program crashes on Android 4.0.4 but not on 2.3.3

2012-04-15 Thread James Black
OK, I have tried it a couple of more times, and don't see the back button
log again.

This is what I see:
04-15 09:13:46.614: I/ErrandAssistantService(7015): Setting a new request
for location updates
04-15 09:13:46.661: I/ErrandAssistantService(7015): saveProximityAlert -
used GPS
04-15 09:13:46.669: I/ErrandAssistantService(7015): saveProximityAlert -
used network
04-15 09:13:46.677: I/ErrandAssistantService(7015): saveProximityAlert -
used GPS
04-15 09:13:46.681: I/ErrandAssistantService(7015): saveProximityAlert -
used network
04-15 09:13:47.025: W/CursorWrapperInner(7039): Cursor finalized without
prior close()
04-15 09:13:47.044: I/MapViewActivity(7039): OnResume: mapView loaded = true
04-15 09:13:47.083: I/MapActivity(7039): Handling network change
notification:CONNECTED
04-15 09:13:47.083: E/MapActivity(7039): Couldn't get connection factory
client
04-15 09:13:47.196: I/ErrandMapActivity(7039): onServiceConnected
04-15 09:13:47.196: I/ErrandMapActivity(7039): registering callback
04-15 09:13:47.200: I/ErrandAssistantService(7015): registerCallback
04-15 09:13:47.200: I/ErrandMapActivity(7039): onResume - binding succeeded

Then I see this:
04-15 09:13:49.142: I/ErrandAssistantService(7015): Sent location changed
callback
04-15 09:13:49.142: I/ErrandAssistantService(7015): Sent route changed
04-15 09:13:49.142: I/ErrandAssistantService(7015): geoPoint set


So, the activity had bound to the service, and then later the service sends
back data to the activity, but that activity has already exited.

And, there is no longer anything about the back button having been pressed.

I had cleared the logcat in Eclipse then ran it again, in case I was
confusing when certain code was happening, and that may indeed have been
the case.

On Sun, Apr 15, 2012 at 9:09 AM, Mark Murphy mmur...@commonsware.comwrote:

 On Sun, Apr 15, 2012 at 9:02 AM, James Black planiturth...@gmail.com
 wrote:
  That is the problem, with logcat there is no additional information.

 Then it is not crashing.

  OK, then I see this, which may explain it:
  04-15 08:50:08.682: D/CDA(5805): onBackPressed Called
  04-15 08:50:08.682: D/CustomMapActivity(5805): finish entered
 
  And, when I look much further in the log I found onStop and onDestroy,
 being
  logged, which makes me feel better.
 
  So, now it appears that the phone thinks the back button is being pressed
  when it is sitting untouched, but only if the SDK version is  9.

 I assume that CDA is your code. If so, set a breakpoint or throw a
 RuntimeException in onBackPressed() to see if there is something in
 the call trace that indicates what is triggering it.

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

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.5
 Available!

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




-- 
I know that you believe you understand what you think I said, but I'm not
sure you realize that what you heard is not what I meant.
- Robert McCloskey

-- 
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] Program crashes on Android 4.0.4 but not on 2.3.3

2012-04-14 Thread James Black
Hello,
  I am trying to understand what may be happening in my program.  I don't
get any indication as to why it is crashing, but the basic flow is:
First activity starts
user selects to see map
Remote Service starts up
Almost immediately after binding to and calling onStart on the service the
mapview activity dies.

There is nothing in the logcat to help explain what may be going on.

This works fine on 2.3.3.

This is from my manifest:
uses-sdk
android:minSdkVersion=7
android:targetSdkVersion=11 /

I don't know if it could have anything to do with this.

Any idea how I may want to gather more information?

I put a breakpoint in onDestroy but that didn't help in any way.

When I don't bind to the service it still exits, so it appears the problem
has nothing to do with the service.

-- 
I know that you believe you understandst what you think I said, but I'm
not sure you realize that what you heard is not what I meant.
- Robert McCloskey

-- 
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] Program crashes on Android 4.0.4 but not on 2.3.3

2012-04-14 Thread TreKing
On Sat, Apr 14, 2012 at 11:06 PM, James Black planiturth...@gmail.comwrote:

 Almost immediately after binding to and calling onStart on the service the
 mapview activity dies.


Can you elaborate on dies?

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

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