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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:03:02+00:00 2026-06-12T22:03:02+00:00

I’m developing a camera app basically as part of a messaging app to attach

  • 0

I’m developing a camera app basically as part of a messaging app to attach images etc. The app needs to work for >= SDK 2.2 and:

I can’t use the default Android Camera as much as I’d love to because:

  1. The nature of the app dictates that the image should not be saved to disk ever and some OEMs (Samsung) love to do this without giving you a choice.

  2. I can’t call an intent that any other camera app can intercept because then that app could save the image.

My current problem is dealing with the fact that the Android camera apparently hates being in portrait orientation. Specifically, after some digging I’m monitoring the display and, on rotation, calling setDisplayOrientation(90). This works but the surfaceview dimensions need to be altered also and this must be done within supported dimensions or the parameter setting crashes the app.

I’m doing this with another SO snippet I found here (the getBestPreviewSize() method) but it has one glaring problem that I can’t believe I haven’t found anyone else having.

Part of the takePicture lifecycle involves calling the PostView picture callback. This is what shows the still image of the current paused SurfaceView image that will be returned via byteArray to the raw and/or jpeg callback. My problem is, this image is still skewed on a handful of seemingly random test devices! So the behavior is a user sees a dynamic camera image in perfect 4:3 aspect ratio until they take the picture and the image they are presented with is squished. Note that the byte array itself is correct and when I construct the Bitmap at the messaging end point it shows up fine but this is still a problem.

I can’t see how I can alter the still image display at this point. Can anyone help me with this?

  • 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-12T22:03:03+00:00Added an answer on June 12, 2026 at 10:03 pm

    Android camera system is a mess. And beind soldered to motherboard, camera chip is not going to like portait application – all the callbacks spill out data in camera orientation (buffer you receive is actually shared memory piece with native camera app) – if you like to display it while your application is in portait mode, you will have to flip this data over xy.

    Instead of showing image on the surface view used by camera, I would overlay it with transparent ImageView and draw my bitmap there.

    You may (hopefully) find some inspiration in out javaocr project where android deamon work in portrait mode and draw bitmaps over live preview. (please checkout from git, as it is being released now and I’m struggling with git and maven, see demos directory)

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am writing an app with both english and french support. The app requests

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.