[android-developers] Re: Whenever i move out from an activity, which is in a task of singleTask, activtiy is being cleared up to root of the stack
Dianne, Any update on this? As of ICS, any app opened via installer suffers from this. See http://code.google.com/p/android/issues/detail?id=26658 for instance. -Jonas On Saturday, December 5, 2009 4:09:56 AM UTC+1, Mark Wyszomierski wrote: Hi Dianne, To follow up on this, the package installer seems to launch apps in a similar way Eclipse does, so, the same thing happens here as launching from Eclipse: // From eclipse: Starting activity: Intent { flags=0x1000 comp={com.test.testapp/ com.test.testapp.ActivityMain} } // From package installer (installing APK from the web browser): Starting activity: Intent { action=android.intent.action.MAIN flags=0x1000 comp={com.test.testapp/ com.test.testapp.ActivityMain} } In both cases, I see: 1) App gets started (running entry-point Activity A) 2) App can launch a second activity (Activity B). 3) Hit the home screen key. 4) Return to app via app tray icon (expect to come back to Activity B). 5) Instead of resuming already running app, seems like a new one is started (now showing Activity A) 6) Hit the back key, oddly enough return to ActivityB - back key again goes again to original Activity A). There's got to be a way to stop this from happening? Users get confused when launching from the package explorer. This isn't just my app, this is happening with other 3rd party apps I've been trying out to verify, Thanks On Dec 3, 12:04 am, Mark Wyszomierski mar...@gmail.com wrote: Oh I definitely wasn't precise about the launch method, sorry about that! I definitely didn't think the launch method could have anything to do with it, I was trying all sorts of launch modes, thinking maybe that's what the problem was, Thanks On Dec 2, 11:57 pm, Dianne Hackborn hack...@android.com wrote: I would have mentioned this issue, but you seemed to be very clear that you were launching from an icon in home both times. :} Anyway, I am pretty sure this has been fixed in the tool, though I don't know if that fix is in the current release. On Wed, Dec 2, 2009 at 8:02 PM, Mark Wyszomierski mar...@gmail.com wrote: Actually, I'm probably experiencing this bug, my test app behaves exactly as described: http://code.google.com/p/android/issues/detail?id=2373#makechanges does anyone else see this behavior? Thanks On Dec 2, 8:16 pm, Mark Wyszomierski mar...@gmail.com wrote: I may just be misinterpreting what I'm seeing through DDMS actually. When I run my app, I have three activities, A, B, C. In the DDMS app list, I see my app listed like: com.test.myapp if I select it, and hit the Stop button, it will be killed, but then replaced by a new instance of the application. Different results depending on which activity I'm looking at. If I Stop when Activity A is showing, A just keeps being restarted. If I kill when B is showing, A is shown again. If I kill when C is running, B shows itself. So I'm guessing this is just the OS trying to restart from the last- paused activity - and if on Activity A, there is no previous activity, so it just gets restarted itself. Is this correct? Sorry for the confusion, Thanks On Dec 2, 10:27 am, Mark Wyszomierski mar...@gmail.com wrote: I don't know if it's monkey or not - it looks like it's just this install (I'm sure it's the most recent SDK) - I can reproduce this odd behavior on there. On my other machine, and my test phone, looks like the default behavior is correct (with the same test apps and same SDK updates). Thanks for your help. On Dec 1, 8:38 pm, Dianne Hackborn hack...@android.com wrote: Monkey may be doing odd things. Tasks are matched by intent, so if you build different intents you will be launching different tasks. On Tue, Dec 1, 2009 at 5:33 PM, Mark Wyszomierski mar...@gmail.com wrote: Ok so the sample app code above should be producing the default behavior though, right? This is happening on a mac running 1.5. I did a fresh install of the SDK and the test app on a windows machine here, and it works as you described on that machine (always resumes instance if running in background instead of creating new instances). I'll also see multiple instances when running the monkey test app (on the problematic machine). In the DDMS process list, there will be one listing for the test app. I select it, hit the stop button. The list then shows another instance in its place (has a diff online value etc). It seems like the monkey test app has launched dozens of instances of the test app.
[android-developers] Are activity managed cursors requeried on the UI thread?
From looking at Activity's source code it seems like managed cursors are requiered straight from the UI thread. Am I reading this wrong or is this indeed the case? -Jonas -- 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] View.computeScroll(): How to implement it correctly?
This has been asked before by Daren (here http://groups.google.com/group/android-developers/browse_thread/thread/ab41256a0f57cd44/0c082d62ed206733 and here http://groups.google.com/group/android-developers/browse_thread/thread/3e6276e775b9685b/8b37670956c9b03f) and even though Romain Guy replied, his replies didn't really answer the questions. Here's another try: When doing scrolling animation in View's computeScroll(), we cannot access the members mScrollX and mScrollY directly. They are hidden from the API; funnily enough, Google doesn't seem to eat their own dog food, meaning, they don implement their own apps against the API. For instance, Launcher and Launcher2 both access these members directly to create Android's home screen flinging (http:// android.git.kernel.org/?p=platform/packages/apps/ Launcher2.git;a=blob_plain;f=src/com/android/launcher2/ Workspace.java;hb=master). Instead of accessing these members, one should call scrollTo() with the desired X and Y parameters. scrollTo() then in turn calls invalidate() which should make the screen being redrawn and computeScroll() being called again, thus, creating a sort of animation loop. Unfortunately, as Daren pointed out, invalidate() does not seem to cause computeScroll() being called again. Nothing animates. Calling postInvalidate() however does the trick. Hence, my current workaround is to call scrollTo(), followed by postInvalidate(). This seems ugly since now both invalidate() and postInvalidate() are being called at the same time. From looking at the postInvalidate() code I don't see how it is any different from invalidate(). It is simply an invalidate() call posted into the main thread's message queue. 1. Can anyone clarify why postInvalidate() works, while invalidate() doesn't? 2. What is the correct way to implement computeScroll(), without calling both invalidate() and postInvalidate()? Thanks, -Jonas -- 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: Will service be restarted with all unfinished intents that returned start status START_REDELIVER_INTENT?
Yes is not exactly the most useful response to the question Which [of the two] is it now?. I'm assuming yes relates to the question in the subject. Thanks for the help. On Nov 1, 4:36 pm, Dianne Hackborn hack...@android.com wrote: Yes,. -- 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] Will service be restarted with all unfinished intents that returned start status START_REDELIVER_INTENT?
Hi there, Suppose you have a download service that downloads files asynchronously. For each download intent received it will put the URL of the file to download and the start ID into a job queue and return START_REDELIVER_INTENT. A worker thread then processes that list and calls stopSelf with the start ID it just processed. My question is: If the service's process gets killed and the service restarted, will the service receive all the intents (with the URLs) it hasn't called stopSelf on before it was killed or does the service receive the last intent only? It seems the API docs are ambiguous on this. The docs say if this service's process is killed while it is started [...], then it will be scheduled for a restart and the last delivered Intent re- delivered to it again [...], indicating that only the last intent gets redelivered (which would be terrible in this use case), but they also say The service will [...] be re-started if it is not finished processing all Intents sent to it (and any such pending events will be delivered at the point of restart). Which is it now? Thanks, -Jonas -- 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] Moderators: Where did my post go?
24 hours ago I posted a message with the subject View.computeScroll(): How to implement it correctly?. It was never published. Where did it go? Thanks, -Jonas -- 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