Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7957729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:17:58+00:00 2026-06-04T04:17:58+00:00

I am trying to send camera image from one intent to another intent to

  • 0

I am trying to send camera image from one intent to another intent to display. Currently i am trying using the following method,

Once the image captured

     protected void onActivityResult(int requestCode, int resultCode, Intent data) {  

     super.onActivityResult(requestCode, resultCode, data);  
     switch(requestCode)
     {
         case CAMERA_RECEIPTREQUEST:  
         if(resultCode== Activity.RESULT_OK)
         {
         BitmapFactory.Options options = new BitmapFactory.Options();
         options.inSampleSize = 8;
         //ImageView jpgView = (ImageView)findViewById(R.id.imageView1);
         Bitmap receipt = BitmapFactory.decodeFile(photo.toString(),options);  

         Intent imagepass = new Intent(Activity1.this,Activity2.class);
         imagepass.putExtra("imagepass", imagepass);
         startActivity(imagepass);

In second activity

      @Override
      public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.receiptreview);   
        //creating view ids
        createViewIds();  

        Bitmap receiptimage = (Bitmap) getIntent().getExtras().getParcelable("imagepass");
        receipt.setImageBitmap(receiptimage); 
    } 

But it shows StackOverFlow error,

        at java.util.HashMap$EntrySet.iterator(HashMap.java:944)
        at android.os.Parcel.writeMapInternal(Parcel.java:486)
        at android.os.Bundle.writeToParcel(Bundle.java:1552)
        at android.os.Parcel.writeBundle(Parcel.java:502)
        at android.content.Intent.writeToParcel(Intent.java:5477)

I am not sure whether i am trying wrong method.I am looking for some sample or solution to this.

Thank for your help guys.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:17:59+00:00Added an answer on June 4, 2026 at 4:17 am

    use

             Bitmap receipt = BitmapFactory.decodeFile(photo.toString(),options);  
    
             Intent imagepass = new Intent(Activity1.this,Activity2.class);
             imagepass.putExtra("imagepass", receipt );
             startActivity(imagepass);
    

    instead of

            Bitmap receipt = BitmapFactory.decodeFile(photo.toString(),options);  
    
             Intent imagepass = new Intent(Activity1.this,Activity2.class);
             imagepass.putExtra("imagepass", imagepass);
             startActivity(imagepass);
    

    You are passing Intent instance imagepass in imagepass.putExtra("imagepass", imagepass); so pass Bitmap instance in imagepass.putExtra("imagepass", receipt );

    EDIT:

    for passing images (bitmaps) between activities in android see these posts:

    how do you pass images (bitmaps) between android activities using bundles?

    How can I pass a Bitmap object from one activity to another

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im trying to send two bundles at once from one activity to another and
am trying to send a variable from one activity to another i have set
I am trying to send email using Exchange 2007 from a console app using
I'm trying to display a UIImage in real-time coming from the camera, and it
I am trying to Upload image Capture by Camera into server. server send response
I'm trying to send a bunch of commands to an IP camera using Netcat.
Im trying to send images over HTTP using HttpListener but some images come from
Im trying to send an object from client to server and one of the
trying to send Arabic text from android to PHP file using the code below
I`m trying to send e-mail via c# and use the following code: public static

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.