Can you launch the native Camera App from an Html 5 Web App?

Android 3.0 Honeycomb added Device API support. Google I/O 2011 presentation shows an example on slide 30: <input type=”file” accept=”image/*;capture=camera”> It also points to a test site that not surprisingly does not do much on my Froyo phone. Anybody with a tablet tried it and can tell us what it does and does not do? … Read more

Android Camera Intent Saving Image Landscape When Taken Portrait [duplicate]

The picture is always taken in the orientation the camera is built into the device. To get your image rotated correctly you’ll have to read the orientation information that is stored into the picture (EXIF meta data). There it is stored how the device was oriented, when the image was taken. Here is some code … Read more

How to capture and save an image using custom camera in Android?

please see below answer. Custom_CameraActivity.java public class Custom_CameraActivity extends Activity { private Camera mCamera; private CameraPreview mCameraPreview; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mCamera = getCameraInstance(); mCameraPreview = new CameraPreview(this, mCamera); FrameLayout preview = (FrameLayout) findViewById(R.id.camera_preview); preview.addView(mCameraPreview); Button captureButton = (Button) findViewById(R.id.button_capture); captureButton.setOnClickListener(new View.OnClickListener() … Read more

EXIF orientation tag value always 0 for image taken with portrait camera app android

I also faced same issue in Samsung devices, later I implemented ExifInterface and solved successfully. In any mode images will be shot it will always store in portrait mode only, and while fetching too returning in portrait mode. below of code I used to achieve my goal, I implemented within back camera, not sure about … Read more

Android setFocusArea and Auto Focus

My problem was much simpler 🙂 All I had to do is cancel previously called autofocus. Basically the correct order of actions is this: protected void focusOnTouch(MotionEvent event) { if (camera != null) { camera.cancelAutoFocus(); Rect focusRect = calculateTapArea(event.getX(), event.getY(), 1f); Rect meteringRect = calculateTapArea(event.getX(), event.getY(), 1.5f); Parameters parameters = camera.getParameters(); parameters.setFocusMode(Parameters.FOCUS_MODE_AUTO); parameters.setFocusAreas(Lists.newArrayList(new Camera.Area(focusRect, 1000))); … Read more

Converting YUV->RGB(Image processing)->YUV during onPreviewFrame in android?

Although the documentation suggests that you can set which format the image data should arrive from the camera in, in practice you often have a choice of one: NV21, a YUV format. For lots of information on this format see http://www.fourcc.org/yuv.php#NV21 and for information on the theory behind converting it to RGB see http://www.fourcc.org/fccyvrgb.php. There … Read more

Ideas of Source of QualcommCameraHardware native_get_picture: MSM_CAM_IOCTL_GET_PICTURE Connection timed out error?

MSM_CAM_IOCTL_GET_PICTURE is a kernel call which runs the function static int msm_get_pic(struct msm_sync *sync, void __user *arg) I downloaded the kernel source for your device from the HTCdev and found the function defined in drivers/media/video/msm/msm_camera-7×30.c Could check what are the kernel messages when you take a picture? adb shell su -c “dmesg”

Rotate camera preview to Portrait Android OpenCV Camera

I had the same problem trying to implement OpenCV. I was able to fix it by making the following changes to the deliverAndDrawFrame method. Rotate the canvas object Canvas canvas = getHolder().lockCanvas(); // Rotate canvas to 90 degrees canvas.rotate(90f, canvas.getWidth()/2, canvas.getHeight()/2); Resize the bitmap to fit entire size of canvas before drawing // Resize Bitmap … Read more

How to get the Correct orientation of the image selected from the Default Image gallery

If the image(photo) was taken by a program made by you, you must set Parameters.setRotation with the correct rotation value. This, depending of camera drive, rotates the image before save or save the rotation value to exif TAG_ORIENTATION. Therefore, if TAG_ORIENTATION is null or zero, the image are in the correct orientation, otherwise you must … Read more