Hi all,

 Sorry to resend the mail. But I am in need of help. If any one know about
the solution, Please help me.

Thanks,
Nishant

On Thu, Jul 1, 2010 at 10:05 PM, NishantKumar <[email protected]>wrote:

> Hi,
>
> I want that no further execution of statements should take place when
> a new activity is called from main activity and
>
> when the result is set from the called activity for the caller
> activity.
>
> How can I do that? Please help!!!
>
> I have the following scenario
>
> I have two activity:
>  Activity 1:     Caller.java
>  Activity 2:     Called.java
>
>
>
> IN Caller activity , I am calling the called activity. But, in my
> code , I have some statements that I dont want to execute when caller
> calls called.
>
> In Called Activity ,  when result is set by using setResult(), then I
> dont want any execution in this activity.
> I simply want it to return.
>
> HOW CAN I DO THAT?  PLEASE HELP.   I have the following code
>
>
> CALLED Activity
>
>     for(int i=0;i<1000;i++)
>                Log.d("Debug","In Called Activity");
>
>            Bundle bundle = new Bundle();
>            Intent returnIntent = new Intent();
>            bundle.putString("isSuccess", "Success");
>            returnIntent.putExtras(bundle);
>            setResult(RESULT_OK,returnIntent);
>            finish();
>
>  ////
>  ////   Now I dont want this for loop to execute as I have returned
> result back to caller activity
>  ////
>     for(int i=0;i<15;i++)
>                Log.d("Debug","Still In Called Activity After RETURNING
> result to Caller");
>
>
>
>
> CALLER Activity
>
>     onCreate()[
>           Intent intent=       new Intent(this, Called.class);
>
>           startActivityForResult(intent,0);
>
>
> ////
> /////   I dont want to execute this for loop as the new Activity has
> been called
> /////
>           for(int i=0;i<15;i++)
>                Log.d("Debug","Still In Caller Activity After Starting
> New Activity ");
>
>
>     }
>
>    onActivityResult()
>
>              if(resultCode==RESULT_OK){
>                        Log.d("DEBUG","INSIDE onActivityResult");
>
>                }
>
> PLease Help me. I am STRUGGLING with this.  Please do mention, if I am
> unable to express my doubt.
>
> Thanks,
> Nishant Kumar
> Student
>
>

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