You may want to update your intent with the latest app state just before the user leaves your application. That way your onResume will work with the most up-to-date intent: Either the one from updated by your widget or the one updated by your app itself.
On May 8, 12:25 am, Esdras Beleza <[email protected]> wrote: > Hi, > > I have a widget that talks with an activity from my application. When > I click in a button on my widget, it sends an intent to my application > main activity, that handles it and shows a dialog. > > My problem is that if I go to another application, alternate between > applications, go to home screen and back -- if my application is not > in foreground -- and I go back to her, the old intent that my widget > sent to my activity is handled again and suddenly a dialog is shown. > > The intent is handled using onResume, to handle the cases where the > application was just created and when the application is restarted by > widget, but also happens when user comes back to it. > > Does anybody here have any tip that could help me to solve this > problem? > > Thanks in advance, > > Esdras Beleza > > -- > 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

