android-camera-intent

Camera_intent has stopped

强颜欢笑 提交于 2019-12-08 13:32:49
问题 I'm a novice in android and was recently developing my first app which basically launches the native camera application, takes a picture and saves it on the device. However, the app keeps crashing when I try to launch the camera app. Please help me get this sorted. Thanks. The log from logcat: 03-22 15:13:35.143: D/AndroidRuntime(17395): Shutting down VM 03-22 15:13:35.144: E/AndroidRuntime(17395): FATAL EXCEPTION: main 03-22 15:13:35.144: E/AndroidRuntime(17395): Process: com.example.vivek

Android Camera Effects Not Working

心已入冬 提交于 2019-12-08 12:54:38
问题 I'm trying to build an image editing app for android and I've just started and already I'm having trouble. Well I can take a picture and save to the sd card. But i try to do some effects the app is running but the effects don't show up in the preview. Heres the complete code that i use: package com.example.camerademo; import java.io.IOException; import android.app.Activity; import android.hardware.Camera; import android.os.Bundle; import android.view.SurfaceHolder; import android.view

Android getting URI from Camera

不羁岁月 提交于 2019-12-08 12:00:23
问题 I am having an issue when taking a photo with the camera on my Nexus 5. I can take photos from the gallery no problem and save them to the back end. However when I try to take a picture using the camera, after I take the picture and select the tick, then the app crashes... I can see that the intent passed to the onActivityResult() is empty but I don't know how to fix this. Can anyone help? thanks. import android.app.Activity; import android.content.Intent; import android.net.Uri; import

Android: Taking picture with low quality [duplicate]

好久不见. 提交于 2019-12-08 11:33:58
问题 This question already has answers here : Low picture/image quality when capture from camera (2 answers) Closed 4 months ago . I created a project that allow user to take a picture and view it. I have no face any issue while taking, view, save and retrieve the photo. But my problem is the image that camera took is in bad quality, I don't know how to set the quality of the camera Intent . Here is my code looks like. .... Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE

Pick Image from Gallery/Camera/DropBox etc

孤者浪人 提交于 2019-12-08 05:00:44
问题 How to give user the option to choose image from Camera / Gallery / DropBox OR any other File systems from the device and show it in an activity as an ImageView object. 回答1: For picking image from Camera/Gallery/DropBox OR any other File systems from the device just call implicit intent... Following code may helps you... pickbtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v){ if (Environment.getExternalStorageState().equals("mounted")){ Intent intent = new

Saving Camera Intent Image To Internal Data Custom Directory

我只是一个虾纸丫 提交于 2019-12-08 03:13:40
问题 My Problem I have a camera intent which I want the image to be saved to a directory in my internal data directory. I have created the directory using: File mydir3 = new File(this.getApplicationContext().getFilesDir(),File.separator+"MyApplication"+File.separator+CCPhotoManager.DIRECTORY+File.separator+PhotoManager); mydir3.mkdirs(); I then proceed to create the file with the specified name as you can see below. String filePath = this.getApplicationContext().getFilesDir()+File.separator+

How to get video from camera Intent and save it to a directory?

风流意气都作罢 提交于 2019-12-07 07:15:01
问题 Is it possible to have code similar to the following that does the same for video? if (resultCode == Activity.RESULT_CANCELED) { // camera mode was canceled. } else if (resultCode == Activity.RESULT_OK) { // Took a picture, use the downsized camera image provided by default Bitmap cameraPic = (Bitmap) data.getExtras().get("data"); if (cameraPic != null) { try { savePic(cameraPic); } catch (Exception e) { Log.e(DEBUG_TAG, "saveAvatar() with camera image failed.", e); } } What I am trying to do

Opening Camera in Portrait mode using Intent

[亡魂溺海] 提交于 2019-12-07 00:15:15
问题 I am able to open the device's Camera from my Activity using an Intent as follows: Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); Uri fileUri = getOutputMediaFileUri(); cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); cameraIntent.putExtra("android.intent.extras.CAMERA_FACING", 1); startActivityForResult(cameraIntent, CAMERA_REQUEST); My problem is my Activity is set to Landscape mode, so when the camera is opened, it is also opened in Landscape

Implement a Take Picture + Crop or use premade Intents?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 14:09:48
问题 I'm in the middle of an Android app which takes a picture, crops it and does some extra stuff. I was hoping to do my own cropping system , but the problem comes when I test in different places. Pictures appear rotated in some cases, and not correctly cropped in others (like they had an extra margin around (seeing extra space of the original picture), or so). More on that, I've considered using Intents . This would release me from the picture taking madness, the cropping, and would add an

How to get full size picture and thumbnail from Camera in the same intent

試著忘記壹切 提交于 2019-12-06 13:03:04
问题 I've been needing to get a solution for this problem. I've already searched and tested many solutions from this community but anyone was fit for helping me. I have two activities, the first one takes a picture and sends it to another which has an ImageView to receive that (until here i'm getting problems) and a query to insert the file path in the database (the code which do this last part is well). I guess its better for the View load an Image Low Resolution as a Thumbnail. Therefore, to