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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:22:23+00:00 2026-06-15T14:22:23+00:00

I am developing a custom camera app in Android. My goal is to save

  • 0

I am developing a custom camera app in Android. My goal is to save a picture to file and open it in the fullscreen mode as soon as the file has been saved. Unfortuantely, the problem is that my main activity (ImageCapture) doesn’t wait for ImageCaptureCallback results before calling the next activity (ImageDisplay).

To take a picture I am using a custom ImageCaptureCallback, which saves captured image to “tmpPicturePath” using OutputStream. Later the ImageDisplay activity is called – it reads the file saved in tmpPicturePath.

camera.takePicture(mShutterCallback, mPictureCallbackRaw, new ImageCaptureCallback(this));

// ImageCaptureCallback saves the file in tmpPicturePath

Intent intent = new Intent(ImageCapture.this, ImageDisplay.class);
intent.putExtra("tmpPicturePath", this.getTmpPicturePath());
startActivity(intent);

BUT the file that should be created in ImageCaptureCallback is not yet available at the moment of calling ImageDisplay activity. The overall effect is that not the actual but the previously taken picture is available in the ImageDisplay class. Do you have an idea how to handle this issue? In other words how to wait for callback results before calling the next activity?
Many thanks!

  • 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-15T14:22:24+00:00Added an answer on June 15, 2026 at 2:22 pm

    Sample code for taking picture from camera

    void selectPhoto() {
    
        ContentValues values = new ContentValues();
        values.put(MediaStore.Images.Media.TITLE, "New Picture");
        values.put(MediaStore.Images.Media.DESCRIPTION, "From your Camera");
        imageUri = getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
        Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
        intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
    
        startActivityForResult(intent, SELECT_PHOTO);
    }
    

    and in onActivityResult() method

                try {
                    imageBitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), imageUri);
                } catch (FileNotFoundException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently developing an app that has a camera functionality, with a custom camera
I'm developing a custom contacts app. I read default Contacts app source from Github
I am developing a small application with Custom Camera control . Its working verry
As a company specialized in developing custom CMS, we have been asked to deploy
I'm developing a custom Adsense report tool using Google Java Client Library for Android
I'm developing a custom Android view which i want to be reused. I want
I'm developing custom grep wrapper for git. It shows first line of the file
I'm developing an iOS app that use cordova(2.1), and some custom plugins. The problem
I am developing custom browser for android. When browser supports javascript, when you surf
I am developing a custom Magento module that needs to save a list of

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.