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

  • Home
  • SEARCH
  • 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 8297681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:30:19+00:00 2026-06-08T15:30:19+00:00

I have a Problem. I start from my own Application the Build-In Photoapplication with

  • 0

I have a Problem. I start from my own Application the Build-In Photoapplication with a Photo-Intent.

        String photoName = System.currentTimeMillis() + ".jpg"; 

        File file = new File(getFilesDir(),//Environment.getExternalStoragePublicDirectory(
                //Environment.DIRECTORY_DCIM),
                photoName); // Anlegen der Datei im entsprechenden
                            // Verzeichnis
        FileOutputStream fos = null;
        try {
            fos = openFileOutput(photoName, Context.MODE_WORLD_WRITEABLE);
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        try {
            fos.close();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        outputFileUri = Uri.fromFile(file);
        intentPhoto.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file));
        //startActivity(intentPhoto);
        startActivityForResult(intentPhoto, TAKE_PICTURE);

This is my Code to start the Activity. As you can see, the first thing i do is to set up the file in the directory and then give the intent the location of the file to store it.

But everytime i take a picture it is not saved to the Pictures Directory. The only way to save the picture is to turn off the phone and restart it. Then every picture I have taken befor is there. This happens since the last updated to 4.1.1. Befor i updated the phone, everything worked fine, but since the update I have this problem.

Can somebody help me? Does anyone have the same Issue?

  • 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-08T15:30:21+00:00Added an answer on June 8, 2026 at 3:30 pm

    It works fine now, the problem was that I create the File by my self, with:

    File file = new File(..); 
    

    But you have to use:

    ContentValues values = new ContentValues();
    values.put(MediaStore.Images.Media.TITLE, "IMG_"+ timeStamp+.jpg"); 
    

    And put it into the intent to save the file at once without restarting the phone.

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

Sidebar

Related Questions

I have problem with show or hide form in Window Form Application. I start
I start the NServisBus.host.exe file from my wpf application using the following code: System.Diagnostics.Process.Start(NServiceBus.Host.exe);
When I start GDB from the command line I have no problems. But when
I have encountered the problem to start different version of jboss in the same
I have a problem with expanding JTree nodes. I start when use selects a
I have a problem with moving animation. I want to create animation which start
I have the following problem: I have an Activity where a user can start
I have a focus problem in C# GUI with tabs. I start a process
I have a bizarre problem at the moment, I am just making a start
I have run into a problem with Eclipse Indigo, attempting to start up my

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.