do like this

                                Bundle bundle = new Bundle();
bundle.putInt("Close", 1);
 i = new Intent();
i.putExtras(bundle);
setResult(RESULT_OK, i);
 finish();


@Override
 protected void onActivityResult(int requestCode, int resultCode,
            Intent i){

try{
 if(i!=null){
 Bundle bd = i.getExtras();
 if(bd.getInt("Close") == 1);

 bd.putInt("Close", 1);
 i.putExtras(bd);
 setResult(RESULT_OK, i);


 finish();
  super.onActivityResult(requestCode, resultCode, i);
   }



 }catch(Exception e)
 {
 Toast.makeText(this, e.toString(), Toast.LENGTH_SHORT).show();
 }


 }


On Mon, Apr 5, 2010 at 3:19 AM, skink <psk...@gmail.com> wrote:

>
>
> DroidBy wrote:
> > When onActivityResult(int, int, Intent)  will be called?
> >
> > I notice this is not called when I call finish(); on the activity that
> > I start with startActivityForResult (Intent intent, int requestCode).
> >
> > Does it means the activity is not exit even I call finish() on it?
>
> did you call setResult(int) in your child Activity?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com<android-beginners%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.
>



-- 
Bilal

----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to