Thanks a lot Dianne! On May 2, 6:41 pm, Dianne Hackborn <[email protected]> wrote: > A singleTop activity won't be re-created in this situation. You can use > "adb shell dumpsys activity" to look at what is going on with the activity > stack, and look at the log to see what messages are printed. > > That said, I *strongly* recommend you to not use singleTop for an activity > that is intended to be launched by other applications like this. What is > required for your activity to actually get all of the UI flows right in such > a situations is significant. This is just not how the framework is intended > to be used. The other application is performing a "share" as part of its UI > flow; you should have a new activity instance running on the other > application's task taking care of its share operation rather than dragging > our application on top. > > > > > > On Mon, May 2, 2011 at 4:00 AM, Akshay Goel <[email protected]> wrote: > > Hello, > > > I have an application with a single activity, whose launchMode is set > > to "singleTop". My application is an image viewer/editor & hence a > > user can go to the gallery, choose an image & select my application > > from the share menu to launch my application. > > > Now, I am performing the following steps- > > > 1) Launch my application using the launcher icon. > > 2) Press home. > > 3) Go to gallery & choose an image to share using my application. > > > After step 3, my application's onCreate() method hits again. As far as > > I understand, the activity being the only activity in the stack, was > > at the top, and should not have been created again. Observing the > > gallery intent's flags, I see that the flag is set to 1 (perhaps > > FLAG_GRANT_READ_URI_PERMISSION). > > > Is the declaration singleTop not sufficient to ensure a single > > instance in this scenario? > > > Any help will be appreciated. > > > Thanks, > > Akshay > > > -- > > 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 > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them.
-- 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

