android-camera

How to get plyer camera to save images?

独自空忆成欢 提交于 2020-01-06 14:33:26
问题 When I run my app on my Huawei Android phone, and the plyer camera opens the camera app, after taking the photo, the image is not in its directory, even after the phone being restarted. When I use Image.open("/storage/emulated/0/Download/....png"), it works, but when setting that as the filename in camera._take_picture(), the file isn't saved successfully. I tried editing the uri to start with 'content://' and then with nothing, but in the end nothing works. Is there a way to fix this? def on

save image from camera into sqlite

半腔热情 提交于 2020-01-06 09:06:22
问题 I have an camera Activity like this: public void startCamera() { Log.d("ANDRO_CAMERA", "Starting camera on the phone..."); String fileName = "testphoto.jpg"; ContentValues values = new ContentValues(); values.put(MediaStore.Images.Media.TITLE, fileName); values.put(MediaStore.Images.Media.DESCRIPTION, "Image capture by camera"); values.put(MediaStore.Images.Media.MIME_TYPE, "image/jpeg"); imageUri = getContentResolver().insert( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); Intent

save image from camera into sqlite

淺唱寂寞╮ 提交于 2020-01-06 09:04:03
问题 I have an camera Activity like this: public void startCamera() { Log.d("ANDRO_CAMERA", "Starting camera on the phone..."); String fileName = "testphoto.jpg"; ContentValues values = new ContentValues(); values.put(MediaStore.Images.Media.TITLE, fileName); values.put(MediaStore.Images.Media.DESCRIPTION, "Image capture by camera"); values.put(MediaStore.Images.Media.MIME_TYPE, "image/jpeg"); imageUri = getContentResolver().insert( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); Intent

How to find flashlight feature is available or not in device < = sdk 4

自古美人都是妖i 提交于 2020-01-06 08:14:58
问题 I used to find the flashlight is available or not using this code context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_FLASH); but this code is support for sdk version >= 7 lower version is not supporting. so anybody help to find whether the flashlight is available in lower version Thanks in advance 回答1: Android SDK has Camera class.. you can try getFlashMode method .. If method return null then flash is not support... http://developer.android.com/reference/android

Android move from Landscape to Portrait (or vice versa) when using camera is too slow?

情到浓时终转凉″ 提交于 2020-01-06 02:41:27
问题 I have a DrawerLayout which contains a FrameLayout and ListView in my app, I have to show the camera in the FrameLayout , I've done that fine (as following code) and the camera works correctly. The problem is when moving from portrait orientation to (right-Landscape orientation or left-landscape orientation), or vice versa, it take the mobile a long time to make changes, the problem does not appear when moving from right-Landscape orientation or left-landscape orientation or vice versa. How

Android Camera2 Sample

爷,独闯天下 提交于 2020-01-06 02:32:13
问题 I am trying to find a camera sample for android because I would love to mess with it and see what I can do. I am using the sample code from "Import an android code sample" and using Camera2. I somewhat get how it works however I would want to try it on my phone which is android 4.4 and 5.0 is the only required version. the minimum sdk is 5.0 and if changed error is. `Error:Execution failed for task ':Application:processDebugTestManifest'. com.android.manifmerger.ManifestMerger2

Video plays upside down when recorded from Front Camera in Android

 ̄綄美尐妖づ 提交于 2020-01-05 18:06:23
问题 I am doing android Video Camera Application. It should have capability of recording with back and front camera. I am done with back camera and everything is fine. But when I record with front camera, video plays upside down. I have to play the videos recorded in my application itself. I am using VideoView, How to set orientation or make it play correctly?. Video when played in default media player also playing upside down. Tried sending the video to iPhone and checked but still it plays

Android save image taken with flash on (Nexus 4)

狂风中的少年 提交于 2020-01-05 03:47:07
问题 Below is the code for a custom camera app I'm working on. Everthing works fine, except when the images are taken with flash on. With flash on, the preview showed to the user to accept the image looks right, but the image saved to the sdcard is very dark (with only white objects slightly visible) and often just black. I've been trying to figure out the problem for days now. Any ideas what might be going on? public class CustomCamera extends Activity implements SurfaceHolder.Callback{ Camera

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

时间秒杀一切 提交于 2020-01-05 02:56:07
问题 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 to specified location path of the image, either Image is not there or Image is corrupted. Also I am trying to upload the image to the server using AsyncHttpClient in android but not being able to do it successfully.

Android SurfaceView Preview too dark

▼魔方 西西 提交于 2020-01-05 00:48:49
问题 I'm developing an App that uses Surfaceview. I can take pictures and everything's fine. My problem is: the image of the preview is too dark. I try to change the SceneMode of the camera, but nothing is working (I've tried AUTO, NIGHT and NIGHT_PORTRAIT). Here is the difference between pictures taken with my app: and the Android Camera App (native): Here's my code (the params used on cam): c = Camera.open(0); Camera.Parameters params = c.getParameters(); params.setSceneMode(Camera.Parameters