Ditto.

On Dec 13, 5:01 am, Abhishek Chaudhari <abhi...@yahoo.in> wrote:
> unsubscribe my email id from this group please.
>
> ________________________________
>  From: SH <sung...@identityhive.com>
> To: Android Developers <android-developers@googlegroups.com>
> Sent: Monday, 12 December 2011 10:22 AM
> Subject: [android-developers] Problem about passing intent between two 
> activities
>
> Hi all.
>
> I have an app and fixing errors/bugs. But I have problem when
> NewPictureNote.java calls PhotoTaker.java using
> startActivityForResult() to take a photo and save. My code uses
> callback and put binary data into Intent to return to previous
> activity. Here is the code:
>
> //PhotoTaker.java
> public class PhotoTaker extends BetterDefaultActivity implements
> SurfaceHolder.Callback{
>
> //......
>
>    public void clickHandler(view v){
>         //.....
>         Intent returningIntent = new Intent();
>         returningIntent.putExtra(EXTRA_IMAGE_DATA, jpegPictureData);
>         setResult(RESULT_OK,returningIntent);
>         finish();
>         break;
>     }
>
> }
>
> //NewPictureNote.java
> public class NewPictureNote extends BetterDefaultActivity {
> //....
>
> protected void onActivityResult(int requestCode, int resultCode,
> Intent data) {
>         super.onActivityResult(requestCode, resultCode, data);
>
> try
>         {
>             //If we are getting a response from our picture taking activity
>             if(requestCode ==REQUEST_CODE_TAKE_IMAGE)
>             {
>                 //If it was successful
>                 if(resultCode == Activity.RESULT_OK)
>                 {
>                     //do something
>                 }
>                 else
>                 {
>                     //The user cancelled or an error occured
>                     setResult(Activity.RESULT_CANCELED);
>                     finish();
>                 }
>             } else {
>                               //...
>             }
>         }
>         catch (Throwable e) {
>                       //...
>         }
>
> }
>
> When I debug code, clickHandler() method in  PhotoTaker.java works
> well. It calls till the end of the clickHanlder() but the Activity
> won't close and onActivityResult() does not work. Please let me know
> what problem is? Thanks in advance.
>
> --
> 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 
> 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 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