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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:28:18+00:00 2026-06-10T14:28:18+00:00

I have made a Custom Camera app and I am showing my image in

  • 0

I have made a Custom Camera app and I am showing my image in an imageview after the camera Click. But here I am facing a problem that the image I captured always set in changed orientation.

i.e If I capture the pic while taking my camera as Portrait it don’t set the image as Portrait, It changes the orientation.

Here is the camera click code :-

@Override
        public void onPictureTaken(byte[] data, Camera camera) {

            //here we write the code for saving the picture onto the sdCard


            File pictureFileDir = getDir();

            //to check whether directory exists or not!!
            if (!pictureFileDir.exists() && !pictureFileDir.mkdirs()) {

                //Log.d(Constants.DEBUG_TAG, "Can't create directory to save image.");
                Toast.makeText(Irant_Custom_cameraApplication.this, "Can't create directory to save image.",
                        Toast.LENGTH_LONG).show();
                return;

            }

            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyymmddhhmmss");
            String date = dateFormat.format(new Date());
            photo_file="Picture_"+date+".jpg";

            photo_FileName = pictureFileDir.getPath()+File.separator+photo_file;

            picture_file = new File(photo_FileName);

            FileOutputStream outStream = null;
            try{
                Toast.makeText(getApplicationContext(), "Image captured!", Toast.LENGTH_LONG).show();
                outStream = new FileOutputStream(picture_file);
                outStream.write(data);
                outStream.close();

                String imgpath = photo_file;
                System.out.println("Path for the image*********************"+photo_file);
                SignupDetails.imagePath=imgpath;

            }


            catch (Exception e) {

                Log.d("Image save error :", e.getMessage());    
            }
        }
    };
  • 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-10T14:28:19+00:00Added an answer on June 10, 2026 at 2:28 pm

    It’s not always implemented the same for each device, some rotate automatically, others don’t. I think the best approach is to look at the EXIF data of the file. That’s your best bet.

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

Sidebar

Related Questions

I have made a custom UISwitch (from this post) . But the problem is,
I have made a custom number pad keypad for my iOS app, but want
Hello people I have made a custom title bar for my app. I would
I have made custom .xml layout for ListView. Now it looks: But it isn't
I have made some custom attached properties that enable me to create a pop
I have made a custom textbox that inherits from textbox. using System.Drawing; using System;
I have made a custom UINavigationController class so that I can have a UIAlertView
So I have made a custom required field validator that turns the background of
I have made a custom Attribute here named AAtribute, and for instance a class
I have made a custom adapter class here is the code public class CustomArrayAdapterForReceipts

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.