I have developed camera application using SurfaceView. It captures image and saves to the sdcard. In 2.1 and 2.2 it works fine but in 2.3 onwards it gives problem.
The exact problem in 2.3 is when I open my camera I am able to see preview in portrait mode but when image is saved its in landscape mode.
I dont know why this is happening? The application works fine in 2.1 and 2.2. If I take picture in portrait mode it saves in portrait only.
waiting for replies.
Thanks in advance.
I've had a similar problem.
Looks like the SDK has some breaking changes.
Try using the setDisplayOrientation, it solved my problem, hopefully, it will help you.
Good luck.
Related
I am using the CWAC-Camera library within my Android application. Recently it was upgraded to v0.6.3, but since then I have noticed that rotation of images doesn't seem to work as expected.
I am starting a CameraFragment within an Activity that is locked to landscape orientation, and have observed the rotation is not correct for an output image with or without setting CameraFragment.lockToLandscape(true). I have managed to reproduce this in the demo application when the "Lock to Landscape" is checked (steps and a screenshot provided below). I have been testing on a Nexus 4 and Nexus 5 both running Android 4.4.2.
Has anyone else experienced this issue since upgrading to v0.6? Previously we were using 0.5.4 which didn't seem to have this issue, but looking at the release log I see there has been a lot of changes to EXIF data/rotation etc.
Steps to reproduce in demo app:
Open application, hold phone portrait or landscape
Select "Lock to Landscape" and "Single shot mode" from menu
Turn phone landscape (if started off portrait in step 1)
Capture image, appears rotated as per screenshot.
Cheers
For the record, this bug was fixed in v0.6.4 of the library.
I've developed an android application using opencv and I used back camera in my app. I can use my app in Galaxy S1 but surprisingly when I want to test it on Galaxy s4, after some seconds my phone restarts!
How can I fix this problem?
you can look at this question that I post:
http://answers.opencv.org/question/20054/video-get-stuck-on-galaxy-s4/
I have also the same problem, till now I didn't solve this problem.
you can see here the status of the bug: http://code.opencv.org/issues/3113 .
I use MediaMetadataRetriever that is much slower and you have to save the video first.
We are trying to display Camera on a part of screen(raw camera). It shows a strange black and white display on Android device, but it works properly on emulator. What do you have any idea about how to solve this problem ?
EDIT: "Tour de Mobile Flex" application in Camera->Raw Camera have same problem.
I set <renderMode>direct</renderMode> in app.xml. That configuration solve my problem.
Setting render mode to direct works for me as well (AIR 3.4 on Nexus S 4.1.2).
If you don't want to manually manage your manifest file, this can be done in the publishing settings dialog ("Edit Application Settings") in CS6.
I'm using the cameraPreview sample coming with the Android API demos. The problem is, the camera preview is showing properly on landscape, but when I rotate the phone to portrait, I get a letterboxed and rotated image.
I'm using Android 2.3.3 and a Samsung Galaxy Ace, but also tried 2.1 on a Xperia Mini 10 Pro.
A couple of pics (sorry for poor the quality):
portrait http://i42.tinypic.com/a9qzuu.jpg
Is this normal behavior of the demo program? What's a proper way to fix it?
This helped for me :
mCamera.setDisplayOrientation(90);
I was able to fix the problem I was having that was very similar to this. It had to do with with an old supports-screens ... / entry I had in my manifest file. I removed this from my manifest and everything worked like a charm. Hopefully this might help solve your problem. Cheers.
Solved it, turns out it was a problem with my manifest, I had to include a line defining a fixed screen orientation for the camera activity. :P
i am suffering with a problem that in android 2.2 emulator, camera doesn't work. it closes down the camera automatically. But this problem is not happening in android 1.5 emulator.
Why it is happening? can any body help?
This is a known issue and has been asked several times on SO - here are some pointers to possible solutions. However, the camera emulation in 2.2 is known to be buggy:
Removing the stencil buffer
Switching to 2.1 or 2.3
So you have two options: Either you try to follow the directions, given by the correct answer in the first thread or switch to an emulator running on either 2.1 or 2.3+.