All Questions
46 questions
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)...
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() {
...
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 ...
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(...
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("...
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 "...
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 ...
1
vote
0
answers
623
views
FileUriExposedException when opening Email Intent
I'm getting a FileUriExposedException when trying to attach a Uri instance to the email intent as an attachment.
I have used the FileProvider pattern for handling of Camera Intent results, and its ...
0
votes
0
answers
213
views
Samsung galaxy S7 cant open camera
I found a bug in my app. the camera intent is not opening only in Samsung s7.
the permission is granted on runtime and i doublechecked that its really granted in the phone.
still i cant open camera to ...
0
votes
3
answers
995
views
Android App- Popup Menu with the Camera App
I've been trying to get my first Android app to work. I have one activity that uses a webview, and I use it to open web pages that have html forms on them.
There was some trouble getting the "Choose ...
0
votes
2
answers
1k
views
android take photo using android front camera not working
I want to take photo with front camara in my android app, i am tried this code but not not working all time opening back camara. My code is.
Intent callCameraApplicationIntent = new Intent();
...
0
votes
1
answer
184
views
Change the color of an actionbar on an activity from a package
I have an Android app that uses a third-party library to perform some camera functions. And it works great! The library displays a new activity that allows you to use the camera and access the photo-...
0
votes
1
answer
188
views
how to load a picture captured from camera in another activity on image view?
I have two image buttons,one is for taking a photo from gallery and display it in another activity. This works fine. It displays the photo with high quality . But when i try to take a picture from ...
0
votes
1
answer
609
views
How to properly error-catch Android camera activity when using the ACTION_IMAGE_CAPTURE Intent
In Android, taking a picture can be done with this basic setup as seen here.
protected void dispatchTakePictureIntent(){
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
...
2
votes
2
answers
725
views
startActivityForResult returns to the wrong activity
I am working on an app which uses a custom camera (with Surfaceview and such), I am using startActivityForResult from my ObjectActivity to go to the activity with the camera named CameraActivity. This ...
0
votes
0
answers
34
views
Camera intent does not work after clicking more than 10 images?
I am clicking images from android using camera intent.It opens the native camera app of android phone.I call onActivityResult to get the data from camera app.When i try to click more than 10 images ...
0
votes
1
answer
548
views
why Image can return to previous activity but not intent to new activity
Why image can be pass to previous activity but not intent to new activity?
ImageFitScreen.java
b = (ImageView) findViewById(R.id.imageView3);
public void selectImage() {
final ...
-1
votes
2
answers
418
views
Failed to pass image to another class
I'm trying to pass an image to another class through intent, but it only works for captured image, not for image selected from gallery.
This is where the camera function get started.In ...
0
votes
2
answers
398
views
Back to previous activity in android
I have Activity A, B and C. In Activity C, it has an image and caption. The image and caption will be return to B when ok button is clicked. In activity b, it will return both to activity A.
Activity ...
1
vote
1
answer
849
views
Media Scanner Is Scanning, But Not Refreshing (Android)
I have a gallery app that also has camera functionality. After taking the photo, my On Activity Result calls for a media scanner to scan for the file. While it does scan for the file, and the LogCat ...
0
votes
1
answer
129
views
Check SD Card after Saving Image (Android)
I have an intent that when complete, saves an image to /sdcard/Aperture. While the image does save, it does NOT show the image as soon as it is saved. What could be the problem? I tried using a scan ...
0
votes
0
answers
42
views
Variable become null after ACTION_VIDEO_CAPTURE [duplicate]
I get NullPointerException on some devices (HTC Desire 510), but I have no idea why. Here's my code:
private String captureFilePath;
private boolean captureVideo(){
if (!MediaUtils....
0
votes
0
answers
168
views
Missing Image after taking photo with android camera intent
I have developed an app that is taking picture using camera intent. Then after taking photo i will resize the photo and move it on application's directory. And also saving a thumbnail size photo. ...
2
votes
0
answers
98
views
Android ACTION_IMAGE_CAPTURE Intent starts Music Player in background
I have an android app, which doesn't work with audio or music player, but it can take pictures from my custom wrapper around Camera class and from calling MediaStore.ACTION_IMAGE_CAPTURE intent, but ...
1
vote
1
answer
98
views
Recent captured file event interception on Android
What i wanna do is simply add log line with file name which was recently captured. Unfortunately, application fails because of below indicated error. Code and error from stack provided below.
Thanks ...
0
votes
1
answer
175
views
android Unable to start activity ComponentInfo NULL Point Exception
My app work strange on diffrent phones - once everything is fine and other time it crash when i try to make photo and save it in my phone's memory. Photo shows up in folder in memory, but when we ...
0
votes
2
answers
95
views
Sharing Image via Intent failed
I am trying to capture image and then share it with apps.
private static final int CAMERA_REQUEST = 1888;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(...
2
votes
0
answers
173
views
Google Glass Take Picture Intent
I'm trying to take a picture with a Google Glass App. Therefore I'm using a SurfaceView which shows the camera preview in the background. The photo is taken with an intent.
The problem is that the ...
-1
votes
1
answer
247
views
How to know photo resolution after camera intent in onActivityResult
Greeting
I have done a camera intent, passing the file parameter to get the full sized image, also I have a function to scale the image and set it in the UI.
How ever, I want to know the resolution ...
0
votes
1
answer
1k
views
takePicture failed when running a Camera Service
im trying to run a Camera Service in the Background, as soon after the Service has started i get an error takePicture failed. I'm new to Android,new to Stackoverflow and also not a good programmer.
I'...
-1
votes
4
answers
536
views
Open device camera only after firing intent for opening camera
I have a scenario in which I fire a intent to open camera through following code.
if(isCameraInUse())
return;
Intent i = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
mImageFile = ...
1
vote
4
answers
9k
views
Capturing Image from camera and displaying it in another activity in android
I am developing an application in which i want to capture the image from the camera and display it in another activity in an image view, my problem is that able to capture the image but after ...
2
votes
1
answer
1k
views
Take picture failed java.lang.runtimeexception unable to start service with intent
I have got exception
"unable to start service with intent java.lang.runtimeexception take picture failed".
I extended my class with the service which I have to use it. I don't want to extend with ...
1
vote
2
answers
807
views
Clear intent action default
I am launching the camera app in normal or secure mode depending on what gesture is performed using my app but once the user selects the app and taps Always then there is no option to change the ...
0
votes
2
answers
992
views
startActivityForResult returning without calling onActivityResult
I am trying to capture a photo and save it in SD card. Image uri is generated and when I invoke startActivityForResult it is returning without calling onActivityResult.
private Uri ...
4
votes
0
answers
584
views
Terrible performance getting image from camera with intent
I'm using the ACTION_IMAGE_CAPTURE intent to allow users of my app to take a photo. I then get that photo and save it so that I can display it in an ImageView in the app.
The code works but the ...
1
vote
0
answers
401
views
Android Galaxy Camera invoke camera app for continuous shot
I'm using the first method outlined in this answer (https://stackoverflow.com/a/10229228) to invoke the camera app to let the user take a photo and return it to my app. What I want to do is get a ...
3
votes
2
answers
3k
views
What data is returned when using ACTION_IMAGE_CAPTURE?
I'm getting a bit confused from this description:
The caller may pass an extra EXTRA_OUTPUT to control where this image
will be written. If the EXTRA_OUTPUT is not present, then a small
sized ...
0
votes
1
answer
164
views
Saving URI image or converting to bitmap while maintaining resolution
So I've got my image to successfully pass to a URI...however I don't know how to save it or convert it to a bitmap while still maintaining resolution. Any suggestions? Thank you.
photoButton....
0
votes
1
answer
2k
views
Take a picture and upload directly in response to a "Choose File" button in a WebView
I'm using a WebView for a simple app that let's users upload pictures on a website. I currently have a "Image Chooser" pop up when a user clicks on the "Choose file" part of the form on my website.
...
4
votes
0
answers
370
views
Calling camera app recreates android activity
I am working on a tabbed activity which is implemented using ActivityGroup. When I call the camera app and returns back its always calling onCreate() and recreates the activity. Because of this the ...
1
vote
0
answers
320
views
Prevent Re Loading an Activity while returning from Camera App
I am creating an app which uses the camera app to take pictures. Once I return from the camera app the entire view gets recreated. To stop this I have added
android:screenOrientation="portrait"
...
1
vote
2
answers
754
views
Android: Adding new buttons after picture capture to accept/decline image
I'm still new to development, and I was wondering if someone can guide me towards the right direction in my situation because I'm not sure where to begin:
Scheme:
After pressing a capture_button to ...
3
votes
1
answer
3k
views
Android - Cropping after Camera and Gallery Intents Gives Strange Results
I'm trying to launch an Android camera intent and a choose-photo intent (two buttons, one for take photo, one for choose from gallery) and both need a crop intent launched after them then have the ...
2
votes
1
answer
1k
views
android camera intent with external camera app, return to original activity?
If a user has an external camera app, such as camera+ that is set as their camera default, how do I make sure that after capturing a photo, it will go back to my original application activity?
...
1
vote
1
answer
773
views
Saving image, audio, and video to sd card
I am having trouble understanding how to save files to sdcard. For my camera class I take a Picture, than create a new directory to save it in. It creates the folder, but the image is not in the ...