Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
29 views

Android Studio SDK 34 get bitmap of full image from camera intent [duplicate]

I am trying to obtain the bitmap of the full size image resulting from an intent, with the following i only obtain de bitmap of the thumbnail. //------- START CAMERA -------------- public void ...
Ingolf Krauss's user avatar
0 votes
1 answer
383 views

getting data null on registerForActivityResult

So everything is worling good camera is opening and also permission dialog is opening if there i no permission, but the image is not getting displayed in the image view. because i am getting null on ...
Jayanta Sarkar's user avatar
1 vote
1 answer
891 views

Camera intent Android return null [duplicate]

Start Intent Code : Intent takePictureIntent = new Intent(); takePictureIntent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, imageUri); takePictureIntent.setAction(MediaStore.ACTION_IMAGE_CAPTURE)...
Anthony Rafael's user avatar
0 votes
1 answer
132 views

process image from camera when pressing take a photo button (circle)?

I did code for processing the image from camera and it works fine, After capturing the image (clicking on take a picture button) it is asking for click ok in camera and then it starts processing image,...
Alokin's user avatar
  • 9
0 votes
0 answers
71 views

android capture image from camera and display in another activity

I want to capture image on button click and display the same image in another activity. The below code is capturing image but displaying in the same activity. How can I take image to next activity? ...
Abm's user avatar
  • 311
-1 votes
1 answer
2k views

camera intent not working correctly for android 11+ (API versions 30+)

Code (rewrote it to run in MainActivity, so if anybody wants to reproduce the problem it will be easier): import android.app.Activity import android.content.Context import android.content.Intent ...
JustSightseeing's user avatar
6 votes
1 answer
5k views

Android 12 (SDK > 29) Extra_Output for ACTION_IMAGE_CAPTURE not working

I want to take a picture with the camera and then send it to another activity. Everything works on the emulator without any problems. But as soon as I try the app on my real device, I always get the ...
Captai-N's user avatar
  • 1,462
1 vote
0 answers
527 views

Android open up apps that use the camera permission?

I want to send the user away from my app to their camera app. The intention is that the user will be directed to open a camera app that allows for the scanning of QR codes. What will work: Attempt to ...
Kenny Sexton's user avatar
5 votes
3 answers
2k views

Android Studio - Unable to capture video from Camera

I am trying to capture video via Gallery or via Camera. I am able to successfully fetch the video from Gallery. However when I try to record the video from camera it loses the track and I am unable to ...
user1584253's user avatar
  • 1,005
0 votes
0 answers
269 views

How can I save captured image via the camera in external storage?

provider_paths <?xml version="1.0" encoding="utf-8"?> <paths> <external-files-path name="my_images" path="Pictures" /> <...
E3219's user avatar
  • 51
0 votes
1 answer
1k views

why a captured image bitmap from Android camera is rotated

I am using IMAGE_CAPTURE camera intent to capture and image and storing it in a file using MediaStore.EXTRA_OUTPUT. When I receive the image in onActivityResult, the bitmap is rotated. Any suggestions ...
BRDroid's user avatar
  • 4,358
0 votes
0 answers
164 views

.putExtra(MediaStore.EXTRA_OUTPUT,photoURI) but it.data is null - Android Kotlin [duplicate]

I want to get the data in putExtra() but it returns null in it.data. I refered to other solutions but they are either quite old or they are in Java. I've check photoURI in Log.d and it does have a ...
AhChing11's user avatar
  • 155
1 vote
1 answer
688 views

Change camera recording codec programmatically in Android

I'm using the following code to record the camera in Android. How can I change the default codec (the default is H264) here? private Uri fileUri; //... private void recordVideo() { ...
angel_30's user avatar
0 votes
1 answer
392 views

Implementing STILL_IMAGE_CAPTURE_SECURE on Android 12

I'm currently trying to implement STILL_IMAGE_CAPTURE_SECURE intent for my camera app. (A intent that gets triggered when the power button is double tapped in secure mode) I have added WAKE_LOCK and ...
Son of Stackoverflow's user avatar
0 votes
1 answer
178 views

saving Android Intent data to image File

I'm getting data over Intent(onActivityResult) from a crop image method and saving it in a file. My challenge is that the file(image) I'm getting is reduced to ~50KB and which is not acceptable as the ...
Pradyut Bhattacharya's user avatar
2 votes
0 answers
1k views

Adding Intent setAction to the new Activity Result API ActivityResultLauncher when selecting Image from Gallery

I am using the new Activity Result API for launching and picking an image from Gallery the problem am having is how can i modify an Intent in the new Activity Result API to work like the old ...
Emmanuel Njorodongo's user avatar
0 votes
1 answer
549 views

Returning an image to IMAGE_CAPTURE_INTENT

I am developing a camera app and would like to implement the feature that allows the app to return an image to another app which called the IMAGE_CAPTURE_INTENT. val pictureIntent = Intent(MediaStore....
Mike's user avatar
  • 165
1 vote
0 answers
735 views

How to get high resolution picture from intents in android?

I am using Intents to open the camera and take images from it. but the image gets pixelated. Is there any proper way of taking high-resolution images and saving them to the gallery? Here is my Intent ...
rehan's user avatar
  • 51
2 votes
1 answer
303 views

Camera intent open the camera app (only the first time)

Here is the context: In my app, I need to capture images, that's why I use camera intent. This feature works perfectly, but only if the camera app was already been opened once before Indeed, this ...
Aymeric Le Feyer's user avatar
1 vote
0 answers
51 views

Android Camera saving image, but not sure where it is being saved

I am stuck in a bit of a problem, my android studio application has a custom camera interface, it is able to save its images by calling the MediaStore.Images.Media.insertImage(...
CodingNoob120031's user avatar
0 votes
2 answers
1k views

Android camera intent open front camera instead of back camera

I'm facing a weird problem sending an intent to mobile camera to take picture. In my phone, xaomi 8, works well but when I install the application on samsung a 51 the intent opens front camera instead ...
Marco Napoletano's user avatar
37 votes
4 answers
29k views

Android 11 (R) return empty list when querying intent for ACTION_IMAGE_CAPTURE

Device: Emulator pixel 3a - Android 11 Code: final List<Intent> cameraIntents = new ArrayList<Intent>(); final Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); ...
Udi Oshi's user avatar
  • 6,867
0 votes
1 answer
239 views

How do I launch the Open Camera app to take a picture without user interaction?

I am trying to launch the Open Camera Android app to take a picture without user interaction for meter reading logging purposes. Plenty of examples on the web to do this using Android intents with ...
VinceJS's user avatar
  • 1,274
0 votes
2 answers
35 views

Issues getting captured imaged from Camera to be viewed as an ImageView object. - Android

I want to create an application that when the user clicks a button, it takes you to the phone's default camera app, captures a pictures and brings it back to the activity's imageview object to be ...
sye's user avatar
  • 211
1 vote
0 answers
2k views

How to open Back / Rear camera in android using intent

I am fairly new to android and I need to open the rear camera from my application currently I am using the intent method to open the camera and capture an image. but the problem is that whenever I ...
StaffShaw's user avatar
0 votes
1 answer
410 views

My camera app is taking pictures but unable to open/save. When i open it is just blank

I designed one app, when I click on it, the camera will open. I can capture a photo but I am unable to see it. It is not saving. I am a beginner and started learning android now. Can anyone help me ...
ghost deathrider's user avatar
0 votes
1 answer
45 views

Can I read the opened camera intent from my so

I built a face detection app that is working fine, the user can: open the camera intent take a picture then it will screen this picture and tell if there is a face in it or no. My idea is I don't ...
Hasan A Yousef's user avatar
0 votes
1 answer
165 views

Glide only returning bitmap on certain devices

I am using Glide to extract a Bitmap from a URL and display it on an ImageView and run it through a function (Firebase ML kit model). However, on some devices this does not work, and I believe a valid ...
Russell C.'s user avatar
0 votes
0 answers
281 views

Take photo programmatically and return file name and path

I read this so that upon clicking the button, the Camera intent is opened, and returned the saved picture file and path to the activity that called it, but I got my app crashed and restarted without ...
Hasan A Yousef's user avatar
1 vote
1 answer
2k views

Open front camera by default

I am creating an app, in which I am setting a profile image and cover image ,so on setting profile image I want to open the front camera by default using intent. I am using pictureIntent.putExtra("...
Kittu's user avatar
  • 11
0 votes
1 answer
237 views

Intent to open default camera in square mode

I can open a camera from intent by this: Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); // Ensure that there's a camera activity to handle the intent ...
Reyjohn's user avatar
  • 2,714
0 votes
1 answer
125 views

Get the color of a pixel from camera intent

I am new with android studio and I have a question about camera.I have done the Take photo tutorial and now I have a button that opens my camera app. I want to take the color of a pixel from the ...
Arghira Andrei's user avatar
1 vote
1 answer
68 views

Camera intent with image only option

I am trying to add camera intent to my app, I would like to give the user only option to take pictures (Not video), is there a way to hide the video button from the camera: Intent intent = new Intent(...
Coder123's user avatar
  • 843
0 votes
1 answer
162 views

Intent ACTION.IMAGE.CAPTURE with gallery on it

I would like to open a Camera Intent on my app but I need to see the gallery on it like Whatsapp does. I think its all about permissions but I don't know how to achieve it. Here is an image of ...
Pamboli's user avatar
  • 15
0 votes
0 answers
146 views

How to pass android.hardware.camera2.TotalCaptureResult object to JobIntentService

I am working on android camera application. I have written one Service which perform operation on the TotalCaptureResult object. How can I pass this object to the JobIntentService ?
code_sniper's user avatar
2 votes
1 answer
1k views

Obtaining image from camera intent on Android

I am following the Google tutorial on launching a new intent to take and deliver a photo. https://developer.android.com/training/camera/photobasics. I am unable to get past a certain spot because I ...
Matthew's user avatar
  • 3,946
1 vote
3 answers
3k views

Android - Camera Intent Causes the App to Crash

I'm trying to activate camera with intent by the following codes : import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import ...
Jerry Chen's user avatar
  • 13.7k
1 vote
1 answer
578 views

Image is uploading from gallery but not from camera through webView

I'm trying to upload image using webview. Everything works fine as expected but only image is not uploading when photo is clicked from camera. please help me to find this. I got some answer but doesn'...
Intellij P's user avatar
0 votes
1 answer
2k views

java.lang.SecurityException: Permission Denial: writing android.support.v4.content.FileProvider uri

I am trying to use camera and save image. Followed the steps as commonsware suggested. Constantly I am getting error - 2018-11-12 02:10:54.588 3145-3173/com.bisw.weac E/DatabaseUtils: Writing ...
Biswajit Das's user avatar
1 vote
1 answer
521 views

Android Samsung ACTION_IMAGE_CAPTURE does not save to correct filename

After many hours of debuging, I am not able to save a picture Intent on a Samsung Android phone into the correct file. Here following code (Kotlin): val filename=File(getExternalStorageDirectory()?....
Marcel Sonderegger's user avatar
2 votes
3 answers
907 views

onActivityResult data on a null object reference

When i am starting camera , the data is null. I don't know why.. This is Camera's code: ((Button)view.findViewById(R.id.BtnOpenCamera)).setOnClickListener(new View.OnClickListener() { @...
XarzaMora's user avatar
0 votes
2 answers
180 views

Capture Image using Camera, File created but not returning in ActivityResult

I have gone through most of the related question regarding the activityresult returning null using camera Intent. Here is my code below: String filepath; File file; Bitmap bitmap; int previewcount=0; ...
Joshan Tandukar's user avatar
0 votes
1 answer
148 views

Getting a picture from an external file directory

I followed the Take photo guide of the Android developer documentation to take a picture. I want to use this picture for the Firebase MLKit, but I just need it temporarily, so I saved it to my private ...
InDaPond's user avatar
  • 572
0 votes
1 answer
191 views

How to get the captured / saved image from camera to another app?

I have a camera app that allows the user to "Save" or "Discard" image after each photo is taken. If "Save" is clicked the app goes back to the MainActivity (camera preview) and keeps the photo. If "...
moe's user avatar
  • 167
0 votes
1 answer
185 views

Android provider path for camera and security

I followed this article to take picture in my application, however in the article the author gives the path . for the FileProvider. <?xml version="1.0" encoding="utf-8"?> <paths xmlns:...
Moussa's user avatar
  • 4,144
-3 votes
1 answer
106 views

How to pass image to other activity with intent

I have a bottom bar. And It has a camera icon. When I click the icon. It shows me a dialog. This dialog has 3 buttons. These are camera request, gallery request and cancel. I take a photo with camera ...
Berkay Isıkoglu's user avatar
-1 votes
1 answer
2k views

ACTION_IMAGE_CAPTURE onActivityResult has empty intent with empty data

After reading this documentation https://developer.android.com/training/camera/photobasics I want to take a photo and to store the uri of the photo into a given variable. The problem is that I'm ...
NullPointerException's user avatar
0 votes
0 answers
52 views

Camera won't open in Moto X

I am trying to open camera in Moto X device using MediaStore.ACTION_IMAGE_CAPTURE.Following is the code : Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.addFlags(Intent....
Sohail Ahmad Khan's user avatar
0 votes
2 answers
139 views

Launching camera and creating a name for the picture is returning null Intent to onActivityResult

My problem is in this line: pictureUri = FileProvider.getUriForFile(this, getApplicationContext().getPackageName() + ".provider", createImageFile()); when i comment it the camera does not return ...
SpaceSloth's user avatar
0 votes
0 answers
85 views

Proper way to start activity that uses camera

I've found some opensource document scanner app, first (default) "DocumentScannerActivity" of this app is a camera for capturing images of documents for further processing. Works good, without any ...
deeplay's user avatar
  • 376

1
2 3 4 5
8