Re: [android-developers] Re: camera app FC/no FC dep. on startup method
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. I'm sorry I can't be more helpful... On Sun, Feb 26, 2012 at 2:15 AM, Jim Graham spooky1...@gmail.com wrote: On Sat, Feb 25, 2012 at 06:44:31PM -0600, Jim Graham wrote: On Sat, Feb 25, 2012 at 06:35:06PM -0600, Jim Graham wrote: On Sun, Feb 26, 2012 at 01:31:08AM +0100, YuviDroid wrote: I'm not sure as to what is going wrong exactly...but you might want to check the launchMode of your activity/ies. http://developer.android.com/guide/topics/manifest/activity-element.html#lmode I will...thanks. And there it is...99% sure that's the issue. And I was wrong...no change. :-( In the manifest, between the application and activity tags, I added android:allowTaskReparenting=true and android:launcherMode=singleTop (as opposed to the default, standard) I added the reparenting one first, tested it...force close. Then I re-read what you wrote above, and changed launchmode from standard (it wasn't specified, thus was the default) to singleTop. Still force closes on exit given the very specific sequence of events I listed earlier. So, I'm back to being confused again. :-( Here's a question: can I assume that installing from the Market, and using Open from there, pause, resume via icon, and exit will result in the same force close as side-loading does? Or am I most likely chasing a ghost...a non-issue that only affects it when side-loaded? I'm inclined to believe that if I'm seeing it, someone else will, too. Thanks, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)MiSTie #49997 Running FreeBSD 7.0 spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W 'Wrong' is one of those concepts that depends on witnesses. --Catbert: Evil Director of Human Resources (Dilbert, 05Nov09) 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 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 -- 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 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: camera app FC/no FC dep. on startup method
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 spooky1...@gmail.comICBM/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 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: camera app FC/no FC dep. on startup method
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 activityandit 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 spooky1...@gmail.com 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 spooky1...@gmail.comICBM/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 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 -- 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 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: camera app FC/no FC dep. on startup method
On Sun, Feb 26, 2012 at 02:42:19PM +0100, YuviDroid wrote: Anyway, I tried adding a different launchMode to the Snapshot activityandit worked! I used 'singleTop'. Funny...I tried that yesterday. I must have made a typo or something. Anyways, I downloaded the new apk, and it worked. I don't understand why, or how, but it worked. Now if I can just find out why, after a reboot this morning, my camera now has a lot of red noise (this started happening a while back...it changes with reboots...Acer wants me to do a factory reset---their mickeysoft-ish answer to everything). Anyways, THANKS! Now I can comfortably get back to work on this beastie. Later, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)MiSTie #49997 Running FreeBSD 7.0 spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W 'Wrong' is one of those concepts that depends on witnesses. --Catbert: Evil Director of Human Resources (Dilbert, 05Nov09) 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 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: camera app FC/no FC dep. on startup method
No problem :) Unfortunately I don't really know what's happening..it seems like the Installer launches apps in some 'strange' way, while the app drawer uses a different way and...dunno something odd happens :S (lol not really useful! eheh) If someone could explain that it would be great. Yuvi DroidAhead http://www.droidahead.com On Sun, Feb 26, 2012 at 2:59 PM, Jim Graham spooky1...@gmail.com wrote: On Sun, Feb 26, 2012 at 02:42:19PM +0100, YuviDroid wrote: Anyway, I tried adding a different launchMode to the Snapshot activityandit worked! I used 'singleTop'. Funny...I tried that yesterday. I must have made a typo or something. Anyways, I downloaded the new apk, and it worked. I don't understand why, or how, but it worked. Now if I can just find out why, after a reboot this morning, my camera now has a lot of red noise (this started happening a while back...it changes with reboots...Acer wants me to do a factory reset---their mickeysoft-ish answer to everything). Anyways, THANKS! Now I can comfortably get back to work on this beastie. Later, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)MiSTie #49997 Running FreeBSD 7.0 spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W 'Wrong' is one of those concepts that depends on witnesses. --Catbert: Evil Director of Human Resources (Dilbert, 05Nov09) 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 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 -- 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 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: camera app FC/no FC dep. on startup method
On Sun, Feb 26, 2012 at 03:13:00PM +0100, YuviDroid wrote: No problem :) Unfortunately I don't really know what's happening..it seems like the Installer launches apps in some 'strange' way, while the app drawer uses a different way and...dunno something odd happens :S (lol not really useful! eheh) No, it's helpful...very much so. It tells me I'm not the only one who isn't making sense of this. :-) (seriously...I'd feel really stupid if it was something obvious that I'd just missed; knowing that I'm not the only one tells me that's not the case!) If someone could explain that it would be great. I'll second that! I am incredibly curious about this one. Thanks! --jim PS: Only two reboots to get the camera on my A500 back to normal. The last time took about six reboots Acer says reset. But before I reset, I want a FULL backup (settings and all). Acer even said I could do so, reset, and un-root and keep my warranty. BUT...to root the A500, you have to do a full reset. H I have to do a full reset so I can root my tablet and do a full backup before I do a full reset. Brilliant...absolutely fscking brilliant :-( And to bring this rant back to being on-topic: I REALLY wish ALL devs would put app preferences and data (encrypted if needed to protect privacy) in an area (such as the SDCard) that can be backed up without root. Then, back up all apps with AppMonster, back up the SDCard's settings area(s), and restoring the device would be SO simple. -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)MiSTie #49997 Running FreeBSD 7.0 spooky1...@gmail.comICBM/Hurr.: 30.44406N 86.59909W Seen in alt.sysadmin.recovery: Priceless; that's better than telling him to use the Read Manual command with the Real Fast option. 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 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: camera app FC/no FC dep. on startup method
Launcher starts activites with: Flags = Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED Action = Intent.ACTION_MAIN Category = Intent.CATEGORY_LAUNCHER You can see it in the logcat: 02-26 18:55:39.863 I/ActivityManager( 273): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x1020 cmp=com.jim2/.ConfigureMain bnds=[125,273][238,431] } from pid 673 The 0x1020 is exactly those two flags. Market and Eclipse use intents with slightly different flags. This is a launch from Market: 02-26 18:54:11.133 I/ActivityManager( 273): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x1000 pkg=com.jim2 cmp=com.jim2/.ConfigureMain } from pid 3715 Compared to the Launcher intent, the Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED is missing. This is a launch from Eclipse: [2012-02-26 19:01:16 - AquaMail] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=org.kman.AquaMail/.ui.AccountListActivity } No flags at all (the missing Intent.FLAG_ACTIVITY_NEW_TASK is probably due to the process getting replaced anyhow). The documentation for this missing flag says: http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_RESET_TASK_IF_NEEDED If set, and this activity is either being started in a new task or bringing to the top an existing task, then it will be launched as the front door of the task. This will result in the application of any affinities needed to have that task in the proper state (either moving activities to or from it), or simply resetting that task to its initial state if needed. Now, even if an app is launched from Market or Eclipse, when you press Home, the current activity get its onPause and onStop called. Getting back to your original issue, I'd try to find out why you see a surface created, not destroyed. -- Kostya On 02/26/2012 06:26 PM, Jim Graham wrote: On Sun, Feb 26, 2012 at 03:13:00PM +0100, YuviDroid wrote: No problem :) Unfortunately I don't really know what's happening..it seems like the Installer launches apps in some 'strange' way, while the app drawer uses a different way and...dunno something odd happens :S (lol not really useful! eheh) No, it's helpful...very much so. It tells me I'm not the only one who isn't making sense of this. :-) (seriously...I'd feel really stupid if it was something obvious that I'd just missed; knowing that I'm not the only one tells me that's not the case!) If someone could explain that it would be great. I'll second that! I am incredibly curious about this one. Thanks! --jim -- 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: camera app FC/no FC dep. on startup method
On Sun, Feb 26, 2012 at 07:06:28PM +0400, Kostya Vasilyev wrote: Market and Eclipse use intents with slightly different flags. So in this case, side-loading using the tablet's installer, would that be considered as the same as launching via the market? Thanks, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)MiSTie #49997 Running FreeBSD 7.0 spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W 'Wrong' is one of those concepts that depends on witnesses. --Catbert: Evil Director of Human Resources (Dilbert, 05Nov09) 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 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: camera app FC/no FC dep. on startup method
On 02/26/2012 07:15 PM, Jim Graham wrote: On Sun, Feb 26, 2012 at 07:06:28PM +0400, Kostya Vasilyev wrote: Market and Eclipse use intents with slightly different flags. So in this case, side-loading using the tablet's installer, would that be considered as the same as launching via the market? Um, what is the tablet's installer? Do you mean a file manager? I don't know the answer off-hand, you can check the logcat, look for ActivityManager output. -- Kostya Thanks, --jim -- 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: camera app FC/no FC dep. on startup method
Sorry for the delay...didn't hear (or see) the announcement about the incoming message On Sun, Feb 26, 2012 at 07:23:28PM +0400, Kostya Vasilyev wrote: On 02/26/2012 07:15 PM, Jim Graham wrote: On Sun, Feb 26, 2012 at 07:06:28PM +0400, Kostya Vasilyev wrote: Market and Eclipse use intents with slightly different flags. So in this case, side-loading using the tablet's installer, would that be considered as the same as launching via the market? Um, what is the tablet's installer? Do you mean a file manager? When you use a file manager (any file manager) and short-press on the apk, and an installer launches to install the app. The fact that it's identical in every file manager I've seen suggests that it's the same one (maybe just the same SDK code, or the same internal app on the device...whatever). I don't know the answer off-hand, you can check the logcat, look for ActivityManager output. It's mostly just a curiousity now, so I'm more inclined to spend time working on my app now that the force close issue is solved. :-) I am curious, but Later, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)| Now what *you* need is a proper pint of spooky1...@gmail.com| porter poured in a proper pewter porter Running FreeBSD 7.0 | pot.. ICBM / Hurricane: |--Peter Dalgaard in alt.sysadmin.recovery 30.44406N 86.59909W | 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 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: camera app FC/no FC dep. on startup method
On Sun, Feb 26, 2012 at 11:36 AM, Jim Graham spooky1...@gmail.com wrote: Sorry for the delay...didn't hear (or see) the announcement about the incoming message On Sun, Feb 26, 2012 at 07:23:28PM +0400, Kostya Vasilyev wrote: On 02/26/2012 07:15 PM, Jim Graham wrote: On Sun, Feb 26, 2012 at 07:06:28PM +0400, Kostya Vasilyev wrote: Market and Eclipse use intents with slightly different flags. So in this case, side-loading using the tablet's installer, would that be considered as the same as launching via the market? Um, what is the tablet's installer? Do you mean a file manager? When you use a file manager (any file manager) and short-press on the apk, and an installer launches to install the app. The fact that it's identical in every file manager I've seen suggests that it's the same one (maybe just the same SDK code, or the same internal app on the device...whatever). Ah, the package manager, you mean, (The thing that catches ACTION_VIEW for apks.) kris -- 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: camera app FC/no FC dep. on startup method
On Sun, Feb 26, 2012 at 01:01:41PM -0500, Kristopher Micinski wrote: Ah, the package manager, you mean, Yeah, that's it. :-) Later, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)| Now what *you* need is a proper pint of spooky1...@gmail.com| porter poured in a proper pewter porter Running FreeBSD 7.0 | pot.. ICBM / Hurricane: |--Peter Dalgaard in alt.sysadmin.recovery 30.44406N 86.59909W | 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 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: camera app FC/no FC dep. on startup method
Hi, Add code / try catch block to check if camera connects OK. If not indicate to user camera is busy, exit and restart app. Regards On Feb 25, 10:33 am, Jim Graham spooky1...@gmail.com wrote: One more detail On Fri, Feb 24, 2012 at 05:12:47PM -0600, Jim Graham wrote: What I'm seeing is a Force Close of my camera app in only one of four situations: 1) side-load app, open via installer, pause using Home button, resume using Honeycomb's active apps display (don't know what it's called---the vertical listing of running apps with mini displays and app names); then close app. NO FORCE CLOSE. 2) open via icon; pause; resume via app icon; close; NO FORCE CLOSE 3) open via icon; pause; resume via HC listing; close; NO FORCE CLOSE 4) side-load, open via installer, pause, open via app icon this time, close; FORCE CLOSES 5) open via either route, DO NOT pause, close app; NO FORCE CLOSE Thanks, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4) MiSTie #49997 Running FreeBSD 7.0 spooky1...@gmail.com ICBM/Hurr.: 30.44406N 86.59909W The iPad is a status symbol for yuppies. The Android is for people who actually want something that works. Android Apps Listing athttp://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 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: camera app FC/no FC dep. on startup method
On Sat, Feb 25, 2012 at 05:45:09AM -0800, gjs wrote: Add code / try catch block to check if camera connects OK. If not indicate to user camera is busy, exit and restart app. No change. Keep in mind, this happens when exiting from the app. AND, it *ONLY* happens if the app is run from the install Open option, AND if the user pauses the app via the Home button, AND if the user then returns to the app via the app icon (as opposed to the Honeycomb active apps listing). Any other combination doesn't force close on exit (i.e., exits normally, as shown both by a normal exit and by logcat showing a clean exit). I'm completely and utterly confused about a number of things here: 1) Why would the app only FC on exit with the above combination? Why not FC when opened via the app icon and resumed via the icon? Why not FC when opened either way and resumed either way (HC active apps display or app icon)? 2) Why is the app behaving differently when paused/restarted with the above combination (i.e., in all other cases, the camera is closed on pause, and re-opened on resume); in that one case above, the camera is not closed on pause, and is simply accessed again when the app resumes. Maybe there's some mysterious difference between these variables that I don't know about, but it's driving me nuts. I'm just about ready to scrap the existing code and start over. But, as one friend/developer has suggested, it could even be a bug in the firmware on my A500who knows? I don't, that's for sure. :-( Thanks, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)MiSTie #49997 Running FreeBSD 7.0 spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W 'Wrong' is one of those concepts that depends on witnesses. --Catbert: Evil Director of Human Resources (Dilbert, 05Nov09) 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 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: camera app FC/no FC dep. on startup method
Hey, I'm not sure as to what is going wrong exactly...but you might want to check the launchMode of your activity/ies. http://developer.android.com/guide/topics/manifest/activity-element.html#lmode I remember I had a similar issue in the past (not with the camera though) when I launched an app from the Market (where it shows the 'Open' and 'Uninstall' buttons), then pressed home, and started that same app from the app drawer. Hope it helps somehow. Yuvi On Sat, Feb 25, 2012 at 3:08 PM, Jim Graham spooky1...@gmail.com wrote: On Sat, Feb 25, 2012 at 05:45:09AM -0800, gjs wrote: Add code / try catch block to check if camera connects OK. If not indicate to user camera is busy, exit and restart app. No change. Keep in mind, this happens when exiting from the app. AND, it *ONLY* happens if the app is run from the install Open option, AND if the user pauses the app via the Home button, AND if the user then returns to the app via the app icon (as opposed to the Honeycomb active apps listing). Any other combination doesn't force close on exit (i.e., exits normally, as shown both by a normal exit and by logcat showing a clean exit). I'm completely and utterly confused about a number of things here: 1) Why would the app only FC on exit with the above combination? Why not FC when opened via the app icon and resumed via the icon? Why not FC when opened either way and resumed either way (HC active apps display or app icon)? 2) Why is the app behaving differently when paused/restarted with the above combination (i.e., in all other cases, the camera is closed on pause, and re-opened on resume); in that one case above, the camera is not closed on pause, and is simply accessed again when the app resumes. Maybe there's some mysterious difference between these variables that I don't know about, but it's driving me nuts. I'm just about ready to scrap the existing code and start over. But, as one friend/developer has suggested, it could even be a bug in the firmware on my A500who knows? I don't, that's for sure. :-( Thanks, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)MiSTie #49997 Running FreeBSD 7.0 spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W 'Wrong' is one of those concepts that depends on witnesses. --Catbert: Evil Director of Human Resources (Dilbert, 05Nov09) 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 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 -- 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 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: camera app FC/no FC dep. on startup method
On Sun, Feb 26, 2012 at 01:31:08AM +0100, YuviDroid wrote: I'm not sure as to what is going wrong exactly...but you might want to check the launchMode of your activity/ies. http://developer.android.com/guide/topics/manifest/activity-element.html#lmode I will...thanks. I remember I had a similar issue in the past (not with the camera though) when I launched an app from the Market (where it shows the 'Open' and 'Uninstall' buttons), then pressed home, and started that same app from the app drawer. That sounds familiar Do you remember what was going on, what the issue was, why it makes any difference, etc.? Thanks, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)MiSTie #49997 Running FreeBSD 7.0 spooky1...@gmail.comICBM/Hurr.: 30.44406N 86.59909W No, I'm not going to explain it. If you can't figure it out, you didn't want to know anyway... --Larry Wall 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 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: camera app FC/no FC dep. on startup method
On Sat, Feb 25, 2012 at 06:35:06PM -0600, Jim Graham wrote: On Sun, Feb 26, 2012 at 01:31:08AM +0100, YuviDroid wrote: I'm not sure as to what is going wrong exactly...but you might want to check the launchMode of your activity/ies. http://developer.android.com/guide/topics/manifest/activity-element.html#lmode I will...thanks. And there it is...99% sure that's the issue. I remember I had a similar issue in the past (not with the camera though) when I launched an app from the Market (where it shows the 'Open' and 'Uninstall' buttons), then pressed home, and started that same app from the app drawer. That sounds familiar Do you remember what was going on, what the issue was, why it makes any difference, etc.? Never mind...after looking at the page, it's spelled out pretty clearly. And it makes sense---the installer app goes away (unlike the Market app, which the app returns to when it exits), leaving the camera app an orphan (in Unix terminology) ... it has no parent left to report its exit status to, and leaves behind the Android version of a zombie...a force close. At least, that's my interpretation. No I'm off to test it...if I don't followup in a few minutes, it fixed everything. Thanks, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)MiSTie #49997 Running FreeBSD 7.0 spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W sigh, once upon a time T-1 was fast --seen in alt.sysadmin.net-abuse.email 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 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: camera app FC/no FC dep. on startup method
On Sat, Feb 25, 2012 at 06:44:31PM -0600, Jim Graham wrote: On Sat, Feb 25, 2012 at 06:35:06PM -0600, Jim Graham wrote: On Sun, Feb 26, 2012 at 01:31:08AM +0100, YuviDroid wrote: I'm not sure as to what is going wrong exactly...but you might want to check the launchMode of your activity/ies. http://developer.android.com/guide/topics/manifest/activity-element.html#lmode I will...thanks. And there it is...99% sure that's the issue. And I was wrong...no change. :-( In the manifest, between the application and activity tags, I added android:allowTaskReparenting=true and android:launcherMode=singleTop (as opposed to the default, standard) I added the reparenting one first, tested it...force close. Then I re-read what you wrote above, and changed launchmode from standard (it wasn't specified, thus was the default) to singleTop. Still force closes on exit given the very specific sequence of events I listed earlier. So, I'm back to being confused again. :-( Here's a question: can I assume that installing from the Market, and using Open from there, pause, resume via icon, and exit will result in the same force close as side-loading does? Or am I most likely chasing a ghost...a non-issue that only affects it when side-loaded? I'm inclined to believe that if I'm seeing it, someone else will, too. Thanks, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)MiSTie #49997 Running FreeBSD 7.0 spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W 'Wrong' is one of those concepts that depends on witnesses. --Catbert: Evil Director of Human Resources (Dilbert, 05Nov09) 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 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: camera app FC/no FC dep. on startup method
One more detail On Fri, Feb 24, 2012 at 05:12:47PM -0600, Jim Graham wrote: What I'm seeing is a Force Close of my camera app in only one of four situations: 1) side-load app, open via installer, pause using Home button, resume using Honeycomb's active apps display (don't know what it's called---the vertical listing of running apps with mini displays and app names); then close app. NO FORCE CLOSE. 2) open via icon; pause; resume via app icon; close; NO FORCE CLOSE 3) open via icon; pause; resume via HC listing; close; NO FORCE CLOSE 4) side-load, open via installer, pause, open via app icon this time, close; FORCE CLOSES 5) open via either route, DO NOT pause, close app; NO FORCE CLOSE Thanks, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)MiSTie #49997 Running FreeBSD 7.0 spooky1...@gmail.comICBM/Hurr.: 30.44406N 86.59909W The iPad is a status symbol for yuppies. The Android is for people who actually want something that works. 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 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