android-camera-intent

Android App to Send Images Via Email

三世轮回 提交于 2020-01-01 19:12:07
问题 Ok once again, I am in way over my head here while learning android. After finally developing my simple little app, I am trying to use some of the benefits of having a native app. So, project one, make a page which can send images via email (either from the gallery or camera) Essentially its a select and send via email, but I don't even know where to start. I found some code that somebody else was asking about at; Android App Take/ Email Photo I tried this, but get all sorts of errors from

lock your camera view to landscape mode in android [duplicate]

会有一股神秘感。 提交于 2020-01-01 10:59:46
问题 This question already has an answer here : How to lock the orientation to Portrait when using intent ACTION_IMAGE_CAPTURE? (1 answer) Closed last year . I want to lock my camera view to " Landscape " mode.When I click on the simple button in my app, that time device's camera will open and and that camera should be locked to " Landscape mode ". Can anyone know the solution of this problem? I am using this code inside "CaptureImageActivity.java" activity. So after execution of this activity my

Get Image path from camera intent

送分小仙女□ 提交于 2019-12-30 06:33:54
问题 There is option of capture image from camera in my application.But there is problem to get image from camera. When i use ACTION_IMAGE_CAPTURE this it return null data.Please help me get image path from camera intent Error Log: 07-04 11:22:36.902: E/AndroidRuntime(8329): FATAL EXCEPTION: main 07-04 11:22:36.902: E/AndroidRuntime(8329): java.lang.RuntimeException: Unable to resume activity {com.pausefablogin/com.pausefablogin.AddPOI}: java.lang.RuntimeException: Failure delivering result

Camera Intent returns null onActivityResult

天涯浪子 提交于 2019-12-29 08:14:08
问题 I am trying to take a photo and to save it to a custom location- public void SavePhoto(View view){ Intent imageIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); File imagesFolder = new File(Environment.getExternalStorageDirectory(), "WorkingWithPhotosApp"); imagesFolder.mkdirs(); File image = new File(imagesFolder, "QR_" + timeStamp + ".png"); Uri uriSavedImage = Uri.fromFile(image);

set orientation of android camera started with intent ACTION_IMAGE_CAPTURE [duplicate]

房东的猫 提交于 2019-12-29 03:21:10
问题 This question already has answers here : Why does an image captured using camera intent gets rotated on some devices on Android? (23 answers) Closed last year . I'm working at an application in android which uses camera to take photos.For starting the camera I'm using an intent ACTION_IMAGE_CAPTURE like this: Intent camera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); File image=new File(Environment.getExternalStorageDirectory(),"PhotoContest.jpg"); camera.putExtra(MediaStore.EXTRA_OUTPUT

Camera Intent not saving photo

时光总嘲笑我的痴心妄想 提交于 2019-12-28 05:10:32
问题 I successfully have used this code snippet before, but with the file pointing to somewhere on the SD card. final File temp = new File(getCacheDir(), "temp.jpg"); temp.delete(); Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(temp)); startActivityForResult(intent, CONFIG.Intents.Actions.SELECT_CAMERA_PHOTO); However when I use getCacheDir instead of a loc on the SD card it seems the photo is never saved. Is this a limitation of

Launch default camera app (no return)

拈花ヽ惹草 提交于 2019-12-28 04:08:16
问题 I'd like to launch the default camera, but want it to act like it was started from the launcher (i.e. the resulting picture should be stored by the camera app to the user's gallery, rather than being returned to my app). If I use Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); , the camera app uses the "OK? Retry?"-UI and doesn't save the picture. I'd rather not use a "direct" com.android.camera intent, because a lot of devices use custom camera apps. I've

How to get Image Path just captured from camera

三世轮回 提交于 2019-12-28 03:51:06
问题 below is my code but is not give me image path in onActivity result Uri selectedImageUri = data.getData(); selectedImagePath = getPath(selectedImageUri); Log.w("jay", "Camera Image Path :" + selectedImagePath); Toast.makeText(MiscansOther_pannel.this, selectedImagePath, Toast.LENGTH_LONG).show(); 回答1: This works for me... Code: Uri selectedImageUri = data.getData(); selectedImagePath = getRealPathFromURI(selectedImageUri); Method: getRealPathFromURI() //---------------------------------------

Get Path of image from ACTION_IMAGE_CAPTURE Intent

扶醉桌前 提交于 2019-12-27 11:04:21
问题 Hi I am using ACTION_IMAGE_CAPTURE for capturing image using Intent as follows: Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); cameraIntent.putExtra( MediaStore.EXTRA_OUTPUT, (new File(Environment.getExternalStorageDirectory(), String.valueOf(System.currentTimeMillis()) + ".jpg")) ); startActivityForResult(cameraIntent, 0); I need to store image in an sdcard and retrieve the path of that image using the onActivityResult method. I don't know how to get the image path of the

android- performing crop image is not working properly

一曲冷凌霜 提交于 2019-12-25 09:01:58
问题 I'm working with android crop image , this is my code for cropping image : private void performCrop() { try { Intent cropIntent = new Intent("com.android.camera.action.CROP"); //indicate image type and Uri cropIntent.setDataAndType(picUri, "image/*"); //set crop properties cropIntent.putExtra("crop", "true"); //indicate aspect of desired crop cropIntent.putExtra("aspectX", 1); cropIntent.putExtra("aspectY", 1); //indicate output X and Y cropIntent.putExtra("outputX", 500); cropIntent.putExtra