How to launch front camera with intent?

Word of caution: its a hack Add this to the intent intent.putExtra(“android.intent.extras.CAMERA_FACING”, 1); This solution isn’t sustainable, its using a testing code of the Camera app. For more info look at the “getCameraFacingIntentExtras” static method in Util class of the AOSP Camera project. Update: Looks like that it was disabled in L

Enable rear camera with HTML5

Check out https://simpl.info/getusermedia/sources/ that shows how you can select sources using MediaStreamTrack.getSources(gotSources); You can then select the source and pass it in as optional into getUserMedia var constraints = { audio: { optional: [{sourceId: audioSource}] }, video: { optional: [{sourceId: videoSource}] } }; navigator.getUserMedia(constraints, successCallback, errorCallback); It is now fully available in Stable Chrome and … Read more

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”

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)