Excellent, that works. Thanks Mark.

On Apr 30, 4:09 pm, Mark Murphy <[email protected]> wrote:
> westmeadboy wrote:
> > I have one WidgetProvider but expect the user to have multiple
> > instances of the widget on the home screen.
>
> > When the user clicks on the widget, an intent is fired to start an
> > activity A passing a String extra (which is specific to that instance
> > of the app widget).
>
> > Everything works fine unless the activity is already running, in which
> > case the activity is shown in its previous state (and so the intent
> > extra data is ignored).
>
> > I've tried using various Intent flags (like FLAG_ACTIVITY_NEW_TASK)
> > but they don't seem to help.
>
> Try FLAG_ACTIVITY_SINGLE_TOP and then override onNewIntent() in your
> activity -- you should get the extra that way.
>
> http://developer.android.com/reference/android/app/Activity.html#onNe...)
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Training in US: 14-18 June 2010:http://bignerdranch.com
>
> --
> 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 
> athttp://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 [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