On 8 May 2010 10:08, Mark Murphy <mmur...@commonsware.com> wrote:

> Esdras Beleza wrote:
> > I don't know if I understood your advice, but I tried some things like
> > that.
> >
> > I tried to put new data into the intent (like a "used" flag) and
> > updating the intent with setIntent(updatedIntent). I also tried to
> > create an useless new intent and replace the application intent with
> > setIntent(newIntent). But every time that I go back to application the
> > very first intent is handled again with its original data and then the
> > dialog is shown.
> >
> > I tried to put some state into my code too, but how could my application
> > know the difference between an intent that was sent for the first time
> > and an intent that is being sent again? It's my main problem.
>
> Check out this thread from a bit over a week ago:
>
>
> http://groups.google.com/group/android-developers/browse_thread/thread/d8ea68116c17002a/af9b99df2dd7e03e
>
>
Hi,

I tried to use the flags that were in that thread and they don't work. I'll
try to explain my problem again, more clearly:

1) I have a widget with 3 buttons that starts my activity, sending 3
different types of intents to the activity. Each one makes my application
start showing a dialog A, B or C.

2) I have a onResume() function that handles which intent was sent and shows
the right dialog.

3) If my activity is not running, onResume() is called after onCreate() and
the dialog A, B or C is shown.

4) If my activity is already running, onNewIntent() gets the new received
intent, onResume() is called and the dialog A, B or C is shown.

5) Here comes the problem: if I go to other application (browser, for
example) and go back to my application, the intent seems to be received
again, onResume() is called and the dialog A, B or C is shown. But they must
be shown *only* when the widget is clicked.

Any suggestion? I'm so tired of this problem that I can't think about any
new solution.


Thanks again,


Esdras




> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android Training...At Your Office: http://commonsware.com/training
>
> --
> 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<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://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 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

Reply via email to