FAQ Database Discussion Community


I can't open the Google Glass Camera

android,android-camera,google-glass,google-gdk
I've got this code (based on http://developer.android.com/training/camera/cameradirect.html), but on Google Glass not works for me. The code: public class MainActivity extends Activity { private Camera mCamera; private CameraPreview mPreview; private GestureDetector mGestureDetector; private Camera.PictureCallback mPicture; public static final int MEDIA_TYPE_IMAGE = 1; public static final int MEDIA_TYPE_VIDEO = 2; @Override...

Building an android camera application

java,android,android-camera,runtimeexception
Trying to create an android application to record video and capture images. I've followed the tutorials thus far with some success however I must have a lack of knowledge about the android sdk to not be able to get around this issue. No doubt I will feel stupid once someone...

Textureview/Surface view for Camera preview - Android

android,android-camera,surfaceview
I am working on developing an Android applications that uses camera. To display the camera preview, I observed a lot of examples using surface view or texture view. Why are these preferred over using ImageView to display the camera preview? I have used Imageview to display the preview and it...

W/CameraBase﹕ An error occurred while connecting to camera: 0

java,android,camera,runtime-error,android-camera
There was a similar question but it went unresolved: W/CameraBase﹕ An error occurred while connecting to camera: 0 on camera.open() call I have an app which (naturally) is using the camera. Its been working fine. However with no code changes, between builds, the app started crashing (verified no code changes...

Android Camera2 Parameters Flatten

java,android,android-camera
Is there anything similar to Camera Parameters flatten but for the camera2 API? I saw a WritetoParcel on CaptureRequest but cannot get it to work.

How to get image from gallery which supports for API>=19 & API<19 both?

java,android,android-camera,image-gallery
Image is not importing, every time when I pic image from gallery in Android. Intent i = new Intent(Intent.ACTION_PICK,android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); startActivityForResult(i, LOAD_IMAGE_RESULTS); super.onActivityResult(requestCode, resultCode, data); BitmapFactory.Options BitmapFactoryOptionsbfo = new BitmapFactory.Options(); BitmapFactoryOptionsbfo.inPreferredConfig = Bitmap.Config.RGB_565; if (requestCode == LOAD_IMAGE_RESULTS && resultCode == RESULT_OK && data != null) { imgUri =...

VideoView shows black after video capture from Android camera

android-intent,android-camera,android-videoview
I've been searching for this answer in search engines and on here, but nothing to specifically address video capture from the Android camera app through an Intent in your own app. The capturing happens fine, I see the preview of the video, then when I press okay, it goes back...

Capture camera frames in background (Android)

android,opengl-es,android-camera,android-service
My problem is this: I want a background service, that will obtain frames from the camera in real-time, so that I can analyze them. I've seen a lot of similar topics here that supposedly address this issue, but none of them has really worked in my case. My first attempt...

Rotating a captured video

android,android-camera,android-capture
My app takes a video capture from the front camera and saves it to SD. Although the preview is just fine (after being rotated 90 degrees), the end result is tilt sideways. Is there a way to save it properly?...

Issue in captured image always open in landscape mode custom camera in android

android,android-camera,surfaceview,landscape-portrait
i want to set my captured image in surfaceview in portrait mode so below is my code Saving Captured Image private String imgPathHacked = ""; PictureCallback jpegCallback = new PictureCallback() { public void onPictureTaken(byte[] data, Camera camera) { FileOutputStream outStream = null; long time = 0; try { time =...

Issue with libyuv::ConvertToI420 on Android?

android,android-camera,libyuv
I have an onPreviewFrame callback set up. This gets a byte[] with NV21 data in it. I have set the preview size to 176*144. When device is held in landscape mode, byte[] with 176*144 dimensions is perfect but when device is held in portrait mode I still get byte[] with...

Is there any way to get the real path storing picture captured by Android camera?

android,android-camera
I found some Android OEM store the picture captured by android system camera(developed by OEM) in DCIM folder, but others in DCIM/Camera. So, is there any way to get the real path storing picture captured by Android camera?...

Error while sending picture to webserver in android

java,android,android-camera
I've been having trouble with this part of my app, this is my first app so I use tutorials for every part. On this activity I need to allow the user to take a new picture and send it to my webserver. But it has a fatal error in the...

Getting the Out of memory error when displaying full screen image in android

android,imageview,out-of-memory,android-camera
I have implemented a gridview and full screen image view. Everything works fine, until I do like this. 1. I'll open my grid view and click on any thumbnail image and display the image in full screen. Then i'll come back to grid view from image view and click on...

startActivityForResult for capturing image via the camera returns diffrent requestcode?

android,android-camera
I'm developing an android app with the ability to attach images from the camera. The attach button found in two different activities, and the request code that returns from the camera when finishing is different from one activity to another, here is my code: File f = new File(Environment.getExternalStorageDirectory()+"/aaa/temp", "temp.jpg");...

getUserMedia Android Webview Ionic

android,cordova,android-camera,ionic,getusermedia
I'm trying to do some basic things by getting an Android device's camera stream with getUserMedia. To my understanding, this should be supported on Android Lollipop, which I'm running, but even with permissions set to allow video and audio my request for a media stream is automatically denied. So I...

How to get id of front facing camera using Camera2?

android,android-camera
How can I get id of front facing camera using new Camera2 library? I can't find it anywhere in documentation.

Implementing Multi Select in GridView android

android,gridview,android-camera
enter code here I need to select multiple images inside the GridView and add share and delete button to the gridview. My ImageAdapter class private class ImageAdapter extends BaseAdapter { @Override public View getView(final int position, View convertView, ViewGroup parent) { final ImageView imageView; CheckableLayout checkableLayout; if (convertView == null)...

Avoiding the preview after taking pictures with the integrated camera

android,android-intent,android-camera,start-activity
I want to take a photo with the camera app which is default on the device. After taking it I have my own preview on which the user can input a text and accept the picture or refuse it. This already works fine. My problem is now that some user...

Unable to start qrCode Camera scanner in fragment

android,android-fragments,android-camera
I have two Fragments and in one of them i want to have a QRcode scanner (using ZXingScannerView). However, the camera doesn't start and all i can see is a black screen. Here is my implementation: QRCodeReaderFragment.java private ZXingScannerView mScannerView; private LinearLayout qrCameraLayout; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);...

Diplaying all images from device inside my app

android,android-camera,android-gallery,android-externalstorage
I am using below code to get all images from Camera folder inside DCIM and display in my app.But I want to display all images from mobile inside my app without knowing the exact location where all the images are stored as it can be different for different mobiles like...

Titanium: Saving file locally from Android's Camera/Gallery image

javascript,android,titanium,android-camera,titanium-mobile
I am having issues saving image to local application files in Titanium. Specifically creating file from event.media; function handleImageEvent(event) { imgpreview.image = event.media; var imaget = event.media; var f = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory,imagename); f.write(imaget); } //imagename : I am using in the format of 'photo0.png' Here's the code I have so far...

Refresh QuickBadge/ ImageView on a Fragment after taking a picture

android,image,imageview,fragment,android-camera
I want to take a picture in my App, so if I click on my ImageView/QuickBagde on my Fragment. I'm able to take a picture, after that, I crop it and it return to my App. This is not a big deal and it's working well. But how can I...

Camera crashes after taking picture and hitting ok

java,android,android-camera
I am developing an app which sends an intent to take a picture. I am using a Galaxy S5 but this problem is confirmed on 3 different devices. First the camera started doing a loop where hitting OK just returned back to take another photo. I refactored the code and...

Crop Image taken by camera without using Bitmap

android,android-camera
I am working on an image processing app and I need to divide taken photo into four regions, but using BitmapFactoy takes too much resource and time and slows me down, I would like to do this using raw byte[] data that public void onPictureTaken(byte[] data, Camera camera) gives me....

Camera2 video recording

android,android-camera
I've implemented this offical Google Camera2 example with minor changes into my app to take pictures in a custom camera. I need to also provide the option for video recording, but I can't find an example- maybe because the Camera2 API is relatively new. Does anyone have examples/tutorials on how...

When Image is taken from camera Intent is always landscape

android,android-camera,android-orientation,android-camera-intent
Hi guys I am building an application in which I want the user to take an image from camera and set it as a profile pic. The image is taken fine and saved but is always in LANDSCAPE. I want it to be in the correct orientation. Before this post...

How to set an image taken by the camera in to an imageview.?

android,android-camera,android-bitmap
I am using camera 2 API for creating my own camera ,I want to set the image taken by the camera in to an imageView ,which is on another activity.I have tried this code but it is not working.when clicking the camera button the photo is saved to an sdcard...

Android Camera2 getPreviewFrame

android,android-camera,android-5.0-lollipop
I am trying to get the camera frame in preview mode. I am running the sample project from github https://github.com/googlesamples/android-Camera2Basic The issue I am having is getting the frame in preview mode. Here is the code: private CameraCaptureSession.CaptureCallback mCaptureCallback = new CameraCaptureSession.CaptureCallback() { private void process(CaptureResult result) { switch (mState)...

Android OpenCV: How to slow down camera capture frame rate (purposefully)

android,opencv,android-camera,fps
I'm currently developing an Android face detection app, and I'm wondering how I can slow down the capture frame rate purposefully. Currently it is around 30fps, and all I really require is 5-10fps. That way I don't need to use up additional processing which can be used on other tasks....

How fast can an Android camera flash turn on/off?

android,android-camera
I want to turn the LED flash for the camera of an Android smartphone very fast on/off, and I was wondering if anyone knows about hardware/OS limitation specifications? The flash light software I've used so far on my Samsung GT s7580 seemed to have pretty big latency when I tried...

saving photo on online server android

android,android-camera
i have a problem and i don't know how to solve it. I created an app (android) that is using camera to take pictures and save the pictures in the internal storage. is it possible to save photo on an online server? public class CameraActivity extends Activity { int TAKE_PHOTO_CODE...

android process camera image AFTERwards in OnActivityResult()

android,android-intent,android-camera,onactivityresult
Per the Google Android camera tutorial I'm using: new Intent(MediaStore.ACTION_IMAGE_CAPTURE); or new Intent(MediaStore.ACTION_VIDEO_CAPTURE); to open the camera in my app. Unfortunately, this forces the user to decide beforehand and prevents the user from toggling between pic & vid modes. My problem is I want the user to go directly to...

Nexus 9 Camera2 API - YUV_420_888 vs. getOutputSizes()

android,android-camera,yuv
I'm implementing the Camera2 API with the YUV_420_888 format on a Nexus 9. I checked the output sizes and wanted to use the largest (8MP, 3280 x 2460) size to save. However, it just appears as static lines, similar to how old TV's looked without a signal. I would like...

Open back camera on Android using Intents

android,android-camera
Using this code, I start the Andorid camera: Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE); // create a file to save the image intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); // set the image file name // start the image capture Intent startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE); But this code opens back camera. Is it possible to...

How to Take a photo and attach the photo in an e-mail and send

android-camera,sendmail,android-camera-intent
I want to achieve the following In my app, there will be a screen which allows you to take a picture Once user has taken the picture, he will get an option to send the picture to the predefined email Id as an attachment. Can someone throw some light or...

Adding button makes camera preview not display

android,android-layout,android-camera
I have an app that has a camera preview view. I've added a button that overlays the FrameLayout that the camera preview is inside. Before I added the button the camera preview worked fine; however, after the addition of the button, the camera preview does not display. Here is the...

Best way to check if Camera exists on Android device?

android,camera,android-camera,android-5.0-lollipop,cwac-camera
There is the cwac-camera library, there is also the android.hardware.camera that was deprecated in Lollipop. Now there is android.hardware.camera2. With andorid.hardware.camera, the solution was as simple as checking if Camera.getNumOfCameras() <= 0. I don't know the solution with android.hardware.camera2. I do have the cwac-camera library included in my project, but...

Android getSupportedPreviewSizes() on Camera returns only 3 sizes

java,android,android-studio,android-emulator,android-camera
I'm using the Android Camera API to build a camera app and I need to set the preview size of the camera. I've read that I'm supposed to call getSupportedPreviewSizes() on my camera object's Parameter object to obtain a list of every supported size. The problem is that this list...

Android Camera2 API - Detect when we have focus

android,android-camera
So, I managed to create the functionality i wanted with the old camera the way I wanted it. With mCamera.autoFocus(autoFocusCallback); i detect when I have focus and run the required code while in preview-mode. Now I have a hard time grasping how to do the same in camera2 API. My...

Android Displaying resizable rectangle above camera

android,android-camera
I am attempting to build an Android program with a resizable rectangle over a camera view using this as a guide: How to create a resizable rectangle with user touch events on Android? I have been stuck for a day as I am unable view the display over the relative...

How can we show image in vertical mode after picture taken in android?

android,android-intent,android-camera
Java Code private void previewCapturedImage() { try { BitmapFactory.Options options = new BitmapFactory.Options(); options.inSampleSize = 1; ExifInterface exif = null; try { exif = new ExifInterface(fileUri.getPath()); } catch (IOException e) { e.printStackTrace(); } String exifOrientation = exif.getAttribute(ExifInterface.TAG_ORIENTATION); Log.i("file path",exifOrientation); final Bitmap bitmap = BitmapFactory.decodeFile(fileUri.getPath()); previewimage.setImageBitmap(bitmap); } catch (NullPointerException e) {...

Open full Screen Image when clicked on grid view android

android,camera,imageview,android-camera,share
// This is my On click function which opens New activity for image view. @Override public void onClick(View v) { Intent intent = new Intent(activity, ImageDisplayActivity.class); intent.putExtra("id", position+1); Below i'm getting the path of the file which is clicked. intent.putExtra("position", String.valueOf(getItem(position))); Log.d("ImageAdapter","Intent.putExtra "); activity.startActivity(intent); } This is my ImageDisplayActivity class....

Camera Preview and OCR

xamarin,monodroid,android-camera,ocr,tesseract
I am new to android development - I'm using Xamarin. I am trying to write an application that initiates the camera preview, and then constantly scans the incoming frames for text (I am using Xamarin.Tesseract from NuGet). In other words, I don't want to make the user take a photo...

Save frame from TangoService_connectOnFrameAvailable

android-camera,yuv,image-formats,google-project-tango
How can I save a frame via TangoService_connectOnFrameAvailable() and display it correctly on my computer? As this reference page mentions, the pixels are stored in the HAL_PIXEL_FORMAT_YV12 format. In my callback function for TangoService_connectOnFrameAvailable, I save the frame like this: static void onColorFrameAvailable(void* context, TangoCameraId id, const TangoImageBuffer* buffer) {...

ExifInterface bug with Nexus 5

android,android-camera
In my Android app, I am using the camera by using the android.media.action.IMAGE_CAPTURE intent. I then use ExifInterface because I need to send the miniature of the photo to my server: ExifInterface exif = new ExifInterface(GetinnersActivity.this.getExternalFilesDir(null).toString() + File.separator + fileName); byte[] thumbnail = exif.getThumbnail(); String miniature = Base64.encodeToString(thumbnail,Base64.DEFAULT); //This line...

Releasing camera instance after a single image is captured and returning to parent activity

android,android-activity,android-camera,onactivityresult
I am trying to call camera instance, capture an image and return to the parent activity. I am able to create and call the camera instance, capture and store the image, but the activity with the camera does not exit. The Preview activity creates a camera instance and implements methods...

Human body shape detection on image from Android device camera [closed]

android,android-camera,augmented-reality
I must implement an applcation that draws a heart on a person seen via an Android device camera(augmented reality stuff). So, I must detect the shape/contour of the upper part of human body(head, neck, shoulders) in order to know where the heart must be situated. This stuff must be made...

How to open camera with a portrait orientation?

java,android,android-camera,orientation
My whole android camera app is in portrait mode, so when I open the camera I need it to automatically open in portrait mode. When I open the camera now the preview is sideways. How do I set the camera preview to open in portrait mode so the preview will...

Convert android.media.Image (YUV_420_888) to Bitmap

android,bitmap,android-camera,yuv
I'm trying to implement camera preview image data processing using camera2 api as proposed here: Camera preview image data processing with Android L and Camera2 API. I successfully receive callbacks using onImageAvailableListener, but for future processing I need to obtain bitmap from YUV_420_888 android.media.Image. I searched for similar questions, but...

Launch default camera app and start record automatically

android,android-camera,android-camera-intent
I have a button in my app. With an OnClick event to the button I launch the default camera app. public void startrec(View v) { Intent intent = new Intent(MediaStore.INTENT_ACTION_VIDEO_CAMERA); startActivity(intent); } This works fine. Now is it possible that the camera starts recording automatically without I have to press...

Android “TAKE PHOTO” - Image which is clicked is getting saved as a corrupt image

android,image,android-camera,image-uploading,androidhttpclient
I have a button, which opens up a dialog box asking user to either "Take Picture" or "Choose from gallery". I am facing issues when user "Take photo" , image is getting clicked, and for verification purpose I am setting Bitmap image inside the circularImage view, but when I go...

Image shown when taken by front camera but not visible when taken by Back camera

android,camera,android-camera
I am using native camera in my app. And after taking picture I am showing it to user on next activity in the Imageview. Now the problem is, when I save picture taken by front camera, the picture shows up in the next activity's imageview but not in the case...

how can I turn on the camera flash for specific duration in Android

android,android-camera,flashlight
How to turn on camera flash light programmatically in Android? my question us a variation of the above one i want to specifically set the duration for turning on the flash the value of which is found on runtime is there any way to do this? thanks!...

capture camera image but not save a file

android,android-camera
Is it possible to capture a camera image and use it in my code, but not have the image saved on the device? I need the image for sending to an API, but I have no need for the user to have the file afterwards. Can this be done?

Image data from Android camera2 API flipped & squished on Galaxy S5

android,android-camera,android-5.0-lollipop,galaxy
I am implementing an app that uses real-time image processing on live images from the camera. It was working, with limitations, using the now deprecated android.hardware.Camera; for improved flexibility & performance I'd like to use the new android.hardware.camera2 API. I'm having trouble getting the raw image data for processing however....

Sharing Image via Intent failed

java,android,image,android-intent,android-camera
I am trying to capture image and then share it with apps. private static final int CAMERA_REQUEST = 1888; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_result); Intent cameraIntent = new Intent( android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(cameraIntent, CAMERA_REQUEST); //start the camera and capture an image } protected void onActivityResult(int requestCode, int resultCode, Intent...

Taking multiple photos and making gallery

android,android-camera,android-imageview
I'm writing application for taking photos with camera and when I take photo add to ImageView. This is how i take picture and putting in ImageView: public class TakePhoto extends Activity { private static final int CAMERA_REQUEST = 1888; Button btnCaputre; ImageView image; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);...

ACTION_IMAGE_CAPTURE not working for Android 4.2.2

android,android-intent,android-camera
I'm developing an app that needs to take a picture and save it, and show it in the app. It works for Android 4.0 but not for Android 4.2.2 (and I guess for later versions neither). Here is the code: Button photoBtn = (Button) inflated.findViewById(R.id.btn_photo); photoBtn.setOnClickListener(new View.OnClickListener() { @Override public...

Android Video Orientation changes on mediarecorder.Start()

android,android-camera,android-mediarecorder
This question is similar to posts here, here, here, here and here, but I'm stuck and have spent hours trying to figure it out. I have a video camera preview (which now always shows in the correct orientation), but when I hit record (mediaRecorder.start();), the video orientation changes. I have...

Capture image into three ImageViews

android,android-intent,android-camera
On the same Activity, I have three cards, each with an ImageButton and an ImageView that look like this: When the camera button is pressed, I'd like the camera to take a picture and assign the image taken to that particular ImageView. What I have so far is this: I...

Outline of person's face on android camera

android,xml,android-camera,android-custom-view
I want to super-impose an outline of a face when the camera launches in android. Kind of like an empty avatar or a silhouette. I'm NOT looking for face detection. I just the want the user to have the ability to align the outline to the person's face when taking...

How to open “zxing Barcode” scanning screen in a small window?

android,android-intent,android-camera,zxing,barcode-scanner
"zxing Barcode" scanner is successfully working in my App https://github.com/journeyapps/zxing-android-embedded I want to open the scanning screen (i.e., Intent), on same Activity in the center in a small window How can I get this type of Interface ? http://i.stack.imgur.com/bpT5R.jpg...

Galaxy S4 Android Custom Camera Issue

java,android,android-activity,camera,android-camera
I'm developing an app with a custom camera. Everything works fine in Motorola Moto G but when I try to save the pictures taken by a Galaxy S4, it tooks this aspect: https://www.dropbox.com/s/cxyn6eivtcejzln/Image-6186%5B1%5D.jpg?dl=0 CameraSurface.java @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { Camera.Size previewSize = determinePreviewSize(true,...

Android Camera Crashes every time in onResume or onRestart

android,android-camera
I built a camera application from android camera example. it's working but every time my application resume or restart from onPause and onStop, my application crashes. I already tried this two link1, link2 but nothing changed. How should I fix it? The logcat shows this message: 2169-2169/com.exshinigami.theremembrance E/AndroidRuntime﹕ FATAL EXCEPTION:...

setPreviewSize doesn't work propertly only in some devices

android,opencv,camera,jni,android-camera
I'm developing a application using OpenCV native, and opening the camera in Java. My app works propertly in a MotoG, but when I use other devices, it fails. My preview callback send the image and I got this Error: E/Camera-JNI(22013): Callback buffer was too small! Expected 3110400 bytes, but got...

android - save an image into gallery

android,image,camera,android-camera,gallery
I am attempting to save an image into the android gallery, but unfortunately, it is not showing up. My picture callback is as follows: Camera.PictureCallback mPicture = new Camera.PictureCallback() { @Override public void onPictureTaken(byte[] data, Camera camera) { File pictureFileDir = getDir("images", 0); if (!pictureFileDir.exists() && !pictureFileDir.mkdirs()) { Toast.makeText(getApplicationContext(), "Can't...

Android camera2 speed-up

android,android-camera
I need to speed-up capturing of camera2 API. I tried to build "android-Camera2Basic" project from google samples. For default capture request from example: if (null == activity || null == mCameraDevice) { return; } // This is the CaptureRequest.Builder that we use to take a picture. final CaptureRequest.Builder captureBuilder =...

Android App turn off without error when using camera

android,android-camera
There is a personal profile picture that can choose from photos and take pictures. It works perfectly before, but suddenly, today, I tried to upload photo and take pictures, the app turn off without error but shows: D/I'M HERE 1﹕ After click the camera button1 D/I'M HERE 2﹕ After click...

Can I specify specific light frequencies to sample on an Android phone?

android,android-camera,frequency,light,infrared
I would like to be able to select light frequencies to display on my Android. Unrequired frequencies would be displayed as black; the required frequency as white. Thus the output would be monochrome. This would allow searching by colour, for example 400 nanometres. It would permit digging around in the...

Which View is best choice for android camera preview?

android,performance,android-camera,preview,android-textureview
As we know, we can choose TextureView, SurfaceView and GLSurfaceView for android camera preview. Which one is best choice for camera preview ? I'm focused on the camera performance. ...

How to take and save pictures on Parse with the Anywall? [closed]

android,android-fragments,android-studio,parse.com,android-camera
I am reading both the Anywall and MealSpotter examples for Parse.com and was wondering how I would go about combining some of their features. For example, how would I take and save pictures instead of simply writing text in the posts for the Anywall example? Would I create a new...

Android camera2 CONTROL_AE_MODE_OFF and CONTROL_AF_MODE_CONTINUOUS_PICTURE

android,android-camera
I want to set exact SENSOR_EXPOSURE_TIME, but still have CONTINUOUS_PICTURE focus. According to Android documentation, to set SENSOR_EXPOSURE_TIME I need set CONTROL_AE_MODE_OFF. But in this mode, I can't set CONTROL_AF_MODE_CONTINUOUS_PICTURE, because it works only if CONTROL_AE_MODE != OFF. So, looks like it's impossible. But Camera FV-5 have CONTINUOUS_PICTURE focus and...

Performing an action after user has captured an image

android,android-camera,commonsware-cwac,cwac-camera
I want to perform an action after user has captured an image.But i see nothing happens after I captured an image.I am using below code and CWAC-Camera library.Content written inside onPictureTaken is the action which i want to perform after user captured an image- public class CameraActivity extends Activity implements...

Android camera2 api and exif

android,android-camera
I am experimenting with the camera2 api and I have made an app that can take an a photo from the camera. Now I want to add exif data to the captured image. I have a question on where or how to put the exif information. Should I create an...

Android device crashes when setting FPS, while it is in range of getSupportedPreviewFpsRange

android,android-camera,surfaceview
I have an innerclass CameraView that extends SurfaceView. Inside the surfaceChanged() function I use the following code to set Camera parameters: Camera.Parameters camParams = mCamera.getParameters(); List<Camera.Size> sizes = camParams.getSupportedPreviewSizes(); // Sort the list in ascending order Collections.sort(sizes, new Comparator<Camera.Size>() { public int compare(final Camera.Size a, final Camera.Size b) { return...

Using custom class for JavaCameraView crashes the app

java,android,opencv,android-camera,opencv4android
I am using OpenCV for android and i am trying to set a custom frame rate. Well right now i am trying to set the range for frame rate. I am also trying to set the custom resolution I am following the openCV tutorial 3 Camera Control. the app is...

Android Camera : Does OS deletes empty file?

java,android,android-camera,android-camera-intent
http://developer.android.com/training/camera/photobasics.html gives a good way of capturing image from camera. But as per the tutorial it creates a empty file in "external"(can be user defined) location and what if user cancels activity then empty file will still be there. Is this empty file deletion should be taken care by app...

Render camera preview on a Texture with target GL_TEXTURE_2D

android,opengl-es,android-camera,shader,render-to-texture
I'm trying to render the camera preview on an OpenGL Texture with target GL_TEXTURE_2D. I'm very well aware of SurfaceTexture but I cannot use it because it only works with GL_TEXTURE_EXTERNAL_OES. In the documentation of SurfaceTexture, it's written : Each time the texture is bound it must be bound to...