android-camera

doesn't show picture in android 6 and above

对着背影说爱祢 提交于 2020-01-27 08:46:25
问题 I am trying to learn how to use the camera in an app and this is what I reached , the idea is having a button that opens the camera and that the picture will instantly show on the screen after we take the picture, the second button is from an earlier version that couldn't show the picture immediately and had to be clicked in order to show it. Anyways my problem is that this code doesn't show the picture at android 6.. on my android 5 device it works fine.. the picture is saved in the "sdcard

Android camea startPreview() fails when taking multiple pictures

。_饼干妹妹 提交于 2020-01-25 22:31:26
问题 I'm writing an APP for taking multiple pictures by camera. (Like the burst mode in Camera2, but I'm working on older versions.) It is implemented by takePicture() / onPictureTaken() callback, and work normally on several devices except some performance issues. However I got a RuntimeException of startPreview failed on an HTC Sensation device when trying to start preview for the 2nd picture. Here is the functions about multiple shot: final int multishot_count = 3; .... public void TakePicture(

Xamarin Texture View camera stream size

喜夏-厌秋 提交于 2020-01-25 20:51:06
问题 I created an app that streams data from the camera, in order to let the user take a picture, something like SnapChat. but there is a bug, whenever I take a picture I send it to another activity to show it, everything is fine until this point. But when I go BACK to the firts activity it seems that the size of the texture view has changed. I took some screenshots to show you guys This picture shows the stream ( Firts Activity ) and then the result of the picture(Second Activity) But this

Using Camera.TakePicture with Front Camera Causes Phone to Crash

纵饮孤独 提交于 2020-01-25 12:22:27
问题 I'm working on a simple app that lets the user take a picture of their self and then make modifications to the image. This had been working splendidly but now all of a sudden attempting to take a picture causes the entire phone to crash. The only way I've been able to "resolve" the issue has been by changing: mCamera = Camera.open(1); to: mCamera = Camera.open(); This doesn't make sense to me as Camera.open(1) had been working just fine for the entire life of the app prior. The phone even

How to create multiple camera2 previews in most efficient way?

偶尔善良 提交于 2020-01-25 09:00:27
问题 I am trying to create 4 streams of my camera preview on my activity. I created a TextureView which is registered to the camera2 API for the feed and then I set up a listener on the SurfaceView in order to listen to changes for the feed and update the other 3 previews (ImageViews) accordingly. You can see in my code below: private final TextureView.SurfaceTextureListener mSurfaceTextureListener = new TextureView.SurfaceTextureListener() { @Override public void onSurfaceTextureAvailable

Take picture in android

眉间皱痕 提交于 2020-01-25 05:06:20
问题 Is it possible to take a picture with out opening camera ? I tried with intents but its opening camera, but i don't want to open camera.I tried following Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(takePictureIntent, 1); and after that receiving the activity.But how to do with out opening the camera? 回答1: Yes it is possible for that use SurfaceHolder.Callback Interface . And @TargetApi(9) public void surfaceCreated(SurfaceHolder holder){ Log

Get access to Zxing QR scanner camera view

好久不见. 提交于 2020-01-25 00:17:05
问题 I am new to android development and I am working on an android project where I have to integrate QR scanner. So I thought I would integrate Zxing QR scanner and came across this library https://github.com/dm77/barcodescanner, Following the instructions provided I have successfully integrated and scanned a QR as well. Now I want to customise the camera view. The problem is there is no documentation on how to get access to the camera layout. Since I am new I might be missing something. I have

Saving image to sd with current date and time in name doesn't work

会有一股神秘感。 提交于 2020-01-24 13:51:06
问题 In my application I use a button to launch Camera application and save picture to specific folder on sdCard naming it by current date and time. When I hardcode the name for the picture, it works fine, but if I'm trying to put date in the name it doesn't work at all. Intent imageIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); File imagesFolder = new File(Environment.getExternalStorageDirectory(), Constants.IMAGE_FOLDER_URI); imagesFolder.mkdirs(); Date d = new Date();

How to increase the quality of captured image using Camera 2 API Android?

半城伤御伤魂 提交于 2020-01-24 04:36:04
问题 I am creating Android camera app using google sample. After the phone captures an image there is a difference of image quality. The camera preview has better image quality than the output image. How can I increase the quality of output image? After pinch zoom the difference of quality of preview image and output image even increases. This is my photo fragment and it's base class. 回答1: The only way you have to increase your image quality is increasing your ImageReaderSize to a biggest

Scan QR code if multiple QR code showing on screen

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-23 12:24:45
问题 I am developing one android sample application as an academic project where I need to scan QR code, I used QR scan code library and I am able to detect QR code successfully if on screen there is only one QR code. Right I want to scan QR code although same QR code showing at multiple places on screen at a time. For an example, On my laptop screen QR code image looks like below mentioned images.All QR codes are same, there is no difference between them. Consider below images which are having 6