android-camera

Android where can I get image taken by native camera app

北慕城南 提交于 2019-12-20 06:49:20
问题 I am using native camera app to capture image, And I am not using MediaStore.EXTRA_OUTPUT to specify the path of image. Then how can i get the image using the intent. Thanks. 回答1: To capture images using camera call this intent Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(cameraIntent, requestCode); and to handle the callback use onActivityResult function protected void onActivityResult(int requestCode, int resultCode, Intent data)

Still get error FAILED BINDER TRANSACTION although have compressed it

半城伤御伤魂 提交于 2019-12-20 06:29:47
问题 I wanted to return the image from AddMoreClaims to AddClaims listView . When I click the submit button in AddMoreClaims , I get message E/JavaBinder﹕ !!! FAILED BINDER TRANSACTION !!! . I use this method but still getting this annoying message ! AddMoreClaims Bitmap bmp,photo; byte[] bytes; @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case RESULT_LOAD_IMAGE: if

Android camera Intent not saving in gallery [duplicate]

試著忘記壹切 提交于 2019-12-20 06:12:01
问题 This question already has answers here : Android Newly Taken Photo from custom camera does not appear in gallery (media store) (3 answers) Closed 6 years ago . I am creating a simple application which takes pictures using the camera intent. It works and the pictures are being saved in : storage/emulated/sd/pictures/my_folder . The problem is that I can't see those pictures from the Android Gallery app. I saw different posts about but I couldn't find an answer. How can I watch the pictures?

Capture image rotate after upload

让人想犯罪 __ 提交于 2019-12-20 05:56:25
问题 I am uploading image to server but image is rotate after uploaded to server Even preview is showing correct. So many people facing this problem i found this link but didn't work. And there is many solution but i am not figure out how to fit in my code. Please help me. Here is my code import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os

takePicture failed when running a Camera Service

此生再无相见时 提交于 2019-12-20 05:38:27
问题 im trying to run a Camera Service in the Background, as soon after the Service has started i get an error takePicture failed . I'm new to Android,new to Stackoverflow and also not a good programmer. I've added the right permissions and the service has been declared in the manifest file too. package com.example.nevii.camera; import android.app.Service; import android.content.Intent; import android.hardware.Camera; import android.hardware.Camera.Parameters; import android.os.IBinder; import

Taking a photo with android and displaying metadata

纵然是瞬间 提交于 2019-12-20 04:32:39
问题 I am writing an app that takes a photo and then displays the image with its metadata, this is what I have so far: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <Button android:id="@+id/button1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/openCamera" /> <ImageView android:src="

How to get camera preview frame after every 500ms

拥有回忆 提交于 2019-12-20 04:29:06
问题 I am developing sample application which gives me color code of pointed image or object via Camera in android. My application is similar to this application and I am using this application code for this. Using this application code I am able to get camera preview frames continuously and it gives me color code of current previewframe. I want to make it some delay. I want to get only 1 camera preview frame after every 500ms. How Can i do that, what modification I need to do in this code. Code :

Photo by Camera Upload Exception (Firebase Storage)

这一生的挚爱 提交于 2019-12-20 04:26:14
问题 I'm trying to upload a image taken by the camera in an android application to Firebase storage. The problem is after I take the picture, in the confirmation 'activity', I press the confirm button and it says that "Unfortunately the application stopped". This is the image, when I press the check button, the app crashes... This is my code, the application has the option to upload pictures using the gallery and the camera. import android.support.v7.app.AppCompatActivity; import android.support

Field of camera preview is smaller if I use the way of preview in grifika's ContinuousCaptureActivity

不想你离开。 提交于 2019-12-20 04:25:27
问题 We know that we will get a lager field of preview at the same distance when camera preview ratio set to 4:3 instead of 16:9 , the detail is as follows: Android Camera API - Weird zoom effect But I encountered a problem when I worked with android camera preview with opengl, that is the second way mentioned below. There are 2 ways of implementing camera preview: Traditional way without opengl, just use Camera.setPreviewTexture(SurfaceTexture texture) or Camera.setPreviewDisplay(SurfaceHolder

Android camera2 Lens intrinsic calibration

青春壹個敷衍的年華 提交于 2019-12-20 03:56:11
问题 I downloaded an Android camera2 demo, it ran well. Now I want to get the intrinsic matrix of the camera by querying the CameraCharacteristics. My code is private void setUpCameraOutputs(int width, int height) { Activity activity = getActivity(); CameraManager manager = (CameraManager) activity.getSystemService(Context.CAMERA_SERVICE); try { for (String cameraId : manager.getCameraIdList()) { CameraCharacteristics characteristics = manager.getCameraCharacteristics(cameraId); float[] intrinsic