urmm.....

if the called activity is set to "singletask"  , then the behavior of
the call to onActivityResult  is not like normal case :
onActivityResult   is invoked after the target activity exits.


refer to this link for detail :
http://developer.android.com/reference/android/app/Activity.html#onActivityResult%28int,%20int,%20android.content.Intent%29

or

public void startActivityForResult (Intent intent, int requestCode)
Since: API Level 1

Launch an activity for which you would like a result when it finished.
When this activity exits, your onActivityResult() method will be
called with the given requestCode. Using a negative requestCode is the
same as calling startActivity(Intent) (the activity is not launched as
a sub-activity).

Note that this method should only be used with Intent protocols that
are defined to return a result. In other protocols (such as
ACTION_MAIN or ACTION_VIEW), you may not get the result when you
expect. For example, if the activity you are launching uses the
singleTask launch mode, it will not run in your task and thus you will
immediately receive a cancel result.

As a special case, if you call startActivityForResult() with a
requestCode >= 0 during the initial onCreate(Bundle
savedInstanceState)/onResume() of your activity, then your window will
not be displayed until a result is returned back from the started
activity. This is to avoid visible flickering when redirecting to
another activity.

This method throws ActivityNotFoundException if there was no Activity
found to run the given Intent.



On 6/15/11, TreKing <treking...@gmail.com> wrote:
> On Sun, Jun 12, 2011 at 8:42 AM, Xie Daniel <jasic2...@gmail.com> wrote:
>
>> So , would you like to shed some lights of the way of making the
>> execution blocked in OnActivityResult unless WIFISettings activity
>> exits.
>>
>
> You don't need to block anything - onActivityResult won't be called until
> the activity previously launched with startActivityForResult() is done.
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
> --
> 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

-- 
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