android-camera-intent

Android Camera intent creating two files

时间秒杀一切 提交于 2019-12-03 00:39:21
I am making a program that takes a picture and then shows it's thumbnail. When using the emulator all goes well and the discard button deletes the photo. But on a real device the camera intent saves the image at the imageUri variable and a second one that is named like if I had just opened up the camera and took a picture by itself. private static final int CAMERA_PIC_REQUEST = 1337; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.camera); //start camera values = new

No Activity found to handle Intent com.android.camera.action.CROP

自古美人都是妖i 提交于 2019-12-02 22:51:12
问题 I'm trying to do a picture from my application. I can launch the camera and do the picture, but when has finish to do the picture my app crash. I can see in my screen that my Galery is stopped and this is the error in my log: I've tried to find something but any help me. Thanks in advance FATAL EXCEPTION: main android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.camera.action.CROP dat=file:///data/data/com.android.gallery3d/files/crop-temp (has

android KitKat image Crop

末鹿安然 提交于 2019-12-02 17:35:34
问题 I am passing image url to the following method private void performCrop(Uri imageUri){ try { Intent intent = new Intent("com.android.camera.action.CROP"); // intent.setType("image/*"); intent.setDataAndType(imageUri, "image/*"); List<ResolveInfo> list = getActivity().getPackageManager().queryIntentActivities( intent, 0 ); int size = list.size(); if (size >= 0) { intent.setData(imageUri); intent.putExtra("crop", "true"); intent.putExtra("aspectX", 0); intent.putExtra("aspectY", 0); intent

bitmap crashing when trying to convert camera-intent image to grayscale byte array

谁说胖子不能爱 提交于 2019-12-02 16:35:08
问题 What I am trying to do, is to take a photo using a camera intent, retrieve and convert said photo to a grayscale byte array (note: I am not interested in getting a grayscale image, just need the byte data). Then finally, apply a threshold and average all the pixels above the threshold. The relevant snippet of code is: @Override public void onClick(View v) { Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);

How to set Android default camera app for portrait orientation only

帅比萌擦擦* 提交于 2019-12-02 16:08:33
问题 In my android application I am capturing photo using Android default camera for this purpose I have used below code.after captured a photo I have shown that Image into another activity in full screen mode.if I captured image in portrait mode I can set the whole image into full screen mode. it showed good, after showed a image I can perform my operation.But if I captured a photo from landscape the taken image would set in screen with stretched. so I would like to capture photo using portrait

How to set Android default camera app for portrait orientation only

孤街浪徒 提交于 2019-12-02 12:49:41
In my android application I am capturing photo using Android default camera for this purpose I have used below code.after captured a photo I have shown that Image into another activity in full screen mode.if I captured image in portrait mode I can set the whole image into full screen mode. it showed good, after showed a image I can perform my operation.But if I captured a photo from landscape the taken image would set in screen with stretched. so I would like to capture photo using portrait mode only not in landscape. so how may I lock camera app only for portrait. String fileName = "Camera

Capture image rotate after upload

▼魔方 西西 提交于 2019-12-02 12:09:59
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.AsyncTask; import android.os.Build; import android.provider.MediaStore; import android.support.v7.app

bitmap crashing when trying to convert camera-intent image to grayscale byte array

ⅰ亾dé卋堺 提交于 2019-12-02 10:58:41
What I am trying to do, is to take a photo using a camera intent, retrieve and convert said photo to a grayscale byte array (note: I am not interested in getting a grayscale image, just need the byte data). Then finally, apply a threshold and average all the pixels above the threshold. The relevant snippet of code is: @Override public void onClick(View v) { Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE); } }); } @Override protected void

android KitKat image Crop

允我心安 提交于 2019-12-02 08:40:10
I am passing image url to the following method private void performCrop(Uri imageUri){ try { Intent intent = new Intent("com.android.camera.action.CROP"); // intent.setType("image/*"); intent.setDataAndType(imageUri, "image/*"); List<ResolveInfo> list = getActivity().getPackageManager().queryIntentActivities( intent, 0 ); int size = list.size(); if (size >= 0) { intent.setData(imageUri); intent.putExtra("crop", "true"); intent.putExtra("aspectX", 0); intent.putExtra("aspectY", 0); intent.putExtra("outputX", 150); intent.putExtra("outputY", 150); intent.putExtra("scale", true); intent.putExtra(

Android: Not able to get original photo captured by camera (Able to read compress photo only)

偶尔善良 提交于 2019-12-02 04:01:52
问题 In my application I capture photo by android camera and then I want to send it to the server. For this I use Client Socket programming. I convert the capture photo into bytearray(byte[]) and then send it to the server. Every thing work perfactally. Problem is there I am not able to send original photo to the server. Thumbnail photo is sended by the android mobile phone. But when I capture photo by the camera then original photo is there in Gallery. How to get this original photo to use in my