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 8255799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:38:52+00:00 2026-06-08T01:38:52+00:00

how to store the imagePath of the image that I had captured using the

  • 0

how to store the imagePath of the image that I had captured using the camera activity to database. I also need to retrieve that imagePath and display on another activity?
Can someone help me please?

Update:

public class Image_secondPage extends Activity 
{
    public static final int CAMERA_RESULT = 1;
    Button btn1;
    ImageView imageView1;
    private final String tag = getClass().getName();

    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.image_secondpage);


        imageView1 = (ImageView)findViewById(R.id.imageView1);
     Button btnNext = (Button)findViewById(R.id.buttonNext);
     btnNext.setOnClickListener(new View.OnClickListener()
    {

        @Override
        public void onClick(View v)
        {
            Intent intent = new Intent(Image_secondPage.this, ImagesPage.class);
            startActivity(intent);

        }
    });


        PackageManager pm = getPackageManager();
        if(pm.hasSystemFeature(PackageManager.FEATURE_CAMERA))
        {
            Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
            i.putExtra(MediaStore.EXTRA_OUTPUT, MyFileContentProvider.CONTENT_URI);
            startActivityForResult(i, CAMERA_RESULT);
        }
        else
        {
            Toast.makeText(getBaseContext(), "Camera is not available", Toast.LENGTH_LONG).show();
        }   

    }


    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data)
    {
        super.onActivityResult(requestCode, resultCode, data);
        Log.i(tag, "Receive the camera result");
        if(resultCode == RESULT_OK && requestCode == CAMERA_RESULT)
        {
            File out = new File(getFilesDir(), "newImage.jpg");
            if(!out.exists())
            {
                Toast.makeText(getBaseContext(), "Error while capturing image", Toast.LENGTH_LONG).show();
                return;
            }
            Bitmap mBitmap = BitmapFactory.decodeFile(out.getAbsolutePath());
            imageView1.setImageBitmap(mBitmap);
        }
    }



    @Override
    protected void onDestroy()
    {
        super.onDestroy();
        imageView1 = null;
    }

I am supposed to get the imagePath that I have captured and show the image on the imageView that I had on the next class but I don’t know how. Can someone help me?

  • 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-08T01:38:56+00:00Added an answer on June 8, 2026 at 1:38 am

    try use this

    bitmap = (Bitmap) data.getExtras().get("data"); 
    

    this will give you bitmap image, then you can save it to database or anything you want.

    let me know if this not solve your problem.

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

Sidebar

Related Questions

I am binding a treeview using a Hierarchical class structure as follows. Store ->ImagePath
I am using the following code to bind an image from my database (compact
I get image data from NSURLConnection , and store the data using NSMutableData .
I wrote a code that take's the image path from an XML file using
I have got an image path that I want to store in the shared
I have currently got imagepaths stored within the database and image files stored in
I store some data in a database and I read those data with a
I store some data in MySQL and want to filter out rows that match
I store dates as String in my database, in this format: YYYY-MM-DD HH:MM and
I store various user details in my MySQL database. Originally it was set up

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.