android-camera-intent

How to open default camera without showing chooser?

强颜欢笑 提交于 2019-12-01 23:34:21
问题 How to open default camera in your application? I don't want to open chooser for it (its client's requirement). I am using this intent android.media.action.IMAGE_CAPTURE and calling activity for result. Everything is fine but apps like Line Camera, Paper Camera are appearing in chooser with default camera app, i don't want to show chooser for. Your attentions will be highly appreciated. 回答1: List<ApplicationInfo> list = packageManager.getInstalledApplications(PackageManager.GET_UNINSTALLED

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

感情迁移 提交于 2019-12-01 23:22:10
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 application? My Code: Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); cameraIntent

How to open default camera without showing chooser?

浪子不回头ぞ 提交于 2019-12-01 22:16:03
How to open default camera in your application? I don't want to open chooser for it (its client's requirement). I am using this intent android.media.action.IMAGE_CAPTURE and calling activity for result. Everything is fine but apps like Line Camera, Paper Camera are appearing in chooser with default camera app, i don't want to show chooser for. Your attentions will be highly appreciated. List<ApplicationInfo> list = packageManager.getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES); for (int n=0;n<list.size();n++) { if((list.get(n).flags & ApplicationInfo.FLAG_SYSTEM)==1) { Log.d(

Android: take camera picture intent remove confirmation dialog

六月ゝ 毕业季﹏ 提交于 2019-12-01 22:05:01
问题 it's possible to disable/remove this photo confirmation dialog: I need somehow skip this dialog but I still want use an Intent . I found this android: Take camera picture without "save" / "delete" confirmation but I don't want use SurfaceView . 回答1: I need somehow skip this dialog but I still want use an Intent. That is not possible. There are over 8,000 26,000 Android device models. Across them, there are hundreds of different pre-installed camera apps. Additionally, there are hundreds of

Android: take camera picture intent remove confirmation dialog

放肆的年华 提交于 2019-12-01 20:01:36
it's possible to disable/remove this photo confirmation dialog: I need somehow skip this dialog but I still want use an Intent . I found this android: Take camera picture without "save" / "delete" confirmation but I don't want use SurfaceView . I need somehow skip this dialog but I still want use an Intent. That is not possible. There are over 8,000 26,000 Android device models. Across them, there are hundreds of different pre-installed camera apps. Additionally, there are hundreds of additional camera apps that users can install from the Play Store or elsewhere. Any one of them could respond

code to rotate image captured by camera intent not working in Android

末鹿安然 提交于 2019-12-01 07:51:55
问题 I have a problem that my image captured using camera intent gets rotated, which I asked at Why does an image captured using camera intent gets rotated on some devices on Android? So as per the suggested answers there, I'm now trying to rotate the image which I get using camera(I have used camera intent). My code is, public class SimpleCameraActivity extends Activity { private static final int TAKE_PICTURE = 1888; private Uri imageUri; ImageView imageView; Bitmap bitmap; Button btnOK,

java.Lang.RuntimeException, setParameters failed in android(4.1.1) version

心已入冬 提交于 2019-12-01 06:25:10
I have developed an application which captures a photo when punch in at the time. It's working good on Acer tab(capturing image and saves in sdcard). Now when I run the same application in Samsung Galaxy(Android-4.1.1) My app is getting 'Unfortunately app has stopped' when click on punch in. and my code is here goes.. // ClockIn functionality clockin_btn.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { clockin_btn.setEnabled(false); camera.stopPreview(); capturePhoto(0); // showing one error here in log cat previewing = false; clockin_label.setText(String.format

java.Lang.RuntimeException, setParameters failed in android(4.1.1) version

假装没事ソ 提交于 2019-12-01 04:46:02
问题 I have developed an application which captures a photo when punch in at the time. It's working good on Acer tab(capturing image and saves in sdcard). Now when I run the same application in Samsung Galaxy(Android-4.1.1) My app is getting 'Unfortunately app has stopped' when click on punch in. and my code is here goes.. // ClockIn functionality clockin_btn.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { clockin_btn.setEnabled(false); camera.stopPreview();

How to skip or avoid 'retake and review' option after captureing photo from camera using ACTION_IMAGE_CAPTURE

末鹿安然 提交于 2019-12-01 03:27:20
I want to display the image when I am click the photo and set to on my Imageview without user select yes or not.... I Am research more for that and I know also very well that the camera app itself gives you the ability to review/retake the image, and once an image is accepted, the activity displays it. But I want without review/retake the activity display it..... I am trying this code fine Initilize Uri mImageCaptureUri; For Click on Button Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_SCREEN_ORIENTATION, ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE

onActivityResult returning Intent data.getData(); always Null Only in Marshmallow and Lollipop

你离开我真会死。 提交于 2019-12-01 02:17:30
Read My Whole Code. It is working perfectly on every Phone except Marshmallow and Lollipop . In Marshmallow and Lollipop phones Only problem is coming in data.getData() returning null only in case of Picture Captured . It is working fine if i capture Video .I have 4 cases - Choosing Picture from Gallery and show its thumbnail in Imageview - Working Fine. Capturing Picture from Camera and show its thumbnail in Imageview - NOT WORKING in Marshmallow and Lollipop . Choosing Video from Gallery and show its thumbnail in Imageview - Working Fine. 3.Capturing Video from Camera and show its thumbnail