So, I played a bit with this Snapshot project. First of all, I'm using the
Motorola Xoom with ICS (4.0.3).
I tried following your steps (side load, press home, start from app drawer,
press back) and indeed I got the crash. What's really odd is that in this
scenario when you press 'back' it doesn't call surfaceDestroyed(), but
instead it calls surfaceCreated(), which doesn't really make sense.

Anyway, I tried adding a different launchMode to the Snapshot
activity....and....it worked! I used 'singleTop'.

<activity android:name=".SnapShot"

    android:label="@string/app_name"

    android:launchMode="singleTop">

        <intent-filter>

            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />

        </intent-filter>

</activity>

Maybe it's a Honeycomb thing? I uploaded here the test apk which works for
me (again, on ICS): http://www.mediafire.com/?eylmq4aomurc9do

Let me know if it works also for you..


Ciao,
Yuvi

On Sun, Feb 26, 2012 at 11:41 AM, Jim Graham <[email protected]> wrote:

> On Sun, Feb 26, 2012 at 11:11:25AM +0100, YuviDroid wrote:
> > At this point it might be useful if you manage to create a very small
> > sample app that has this problem, so that you can share that source code
> > and I/we can try it and figure out what's going on.
>
> This is the book example I've been working from:
>
>   http://www.jstrack.org/snapshot.zip
>
> (it's small, and I'd post it here, but I don't know if the list handles
> attachments).  It force closes the same way, only after one specific
> sequence of events (again, side-load, run from installer's
> "Open/Uninstall", pause via Home button, resume via icon).  Again, it
> ONLY does this when you resume via the icon---resuming via Honeycomb's
> active apps listing works fine.  The strange thing is that in all cases
> except the force-close case, pausing the app closes the camera and the
> preview, and then restarts them on resume, where the force-close sequence
> has them NOT being stopped, and just picked back up on resume (and then,
> of course, force close on exit).
>
> Thanks,
>   --jim
>
> --
> THE SCORE:  ME:  2  CANCER:  0
> 73 DE N5IAL (/4)            MiSTie #49997      < Running FreeBSD 7.0 >
> [email protected]                    ICBM/Hurr.: 30.44406N 86.59909W
>
>   "Now what *you* need is a proper pint of porter poured in a proper
>   pewter porter pot.."     --Peter Dalgaard in alt.sysadmin.recovery
>
> Android Apps Listing at http://www.jstrack.org/barcodes.html
>
> --
> 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
>



-- 
YuviDroid
Check out Launch-X <http://android.yuvalsharon.net/launchx.php> (a widget
to quickly access your favorite apps and contacts!)
http://android.yuvalsharon.net

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