Questions tagged [android-camera-intent]

Questions related about calling the camera app from the local device, without the camera permission.

The camera intent is a way to make photos or videos with the camera app of the device without implementing a custom camera activity.

Here is a basic example for such a call:

// create Intent to take a picture and return control to the calling application
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE); // create a file to save the image
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); // set the image file name

// start the image capture Intent
startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);

See the full code on the documentation.

971 questions
0
votes
1 answer

Android get photo from camera orientation crashes the app

Im making an app that takes a photo from camera intent and places it to the activity, I followed the example on google developers. The problem is when I launch the camera intent if I change camera orientation, one time I save the photo it returns a…
Nonyck
  • 652
  • 1
  • 12
  • 28
0
votes
1 answer

Camera intent and Async Task's doInBackground clashes

In my activity i have an AsyncTask, in which i had overridden doInBackGround. In the same activity i have a camera intent to open the camera and allow user to take a pic The problem is when i call the camera intent it is triggering the…
Archie.bpgc
  • 23,812
  • 38
  • 150
  • 226
0
votes
2 answers

Modify Android crop intent

I have created a sample app for cropping images and I am calling the built-in crop intent. Here is my code: Intent intent = new Intent("com.android.camera.action.CROP"); intent.setType("image/*"); …
0
votes
1 answer

Android using build-in camera to capture multi-photos?

I want to ask whether the built-in camera to take photos and change the name in a specific folder. Usually, we call this code to start built-in camera. Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE…
KingWu
  • 370
  • 1
  • 4
  • 21
0
votes
1 answer

startingCamera Intent in onCreate(because of previous intentextras), on configurationchange camera appears again

Following problem: I am calling an activity "B" with extras. If B gets launched and has extras a ACTION_IMAGE_CAPTURE intent is on its way. This works really nice. However, I have done this in onCreate() and therefore, everytime i change the…
Aeefire
  • 888
  • 10
  • 25
0
votes
1 answer

Android: Calling Second time onActivityResult throw error

In my application it captures some images when I click on a button. When I click this button first time then camera Intent open after that onActivityResult is called by the application and then onResume method called by the application every thing…
Vinit ...
  • 1,409
  • 10
  • 37
  • 66
0
votes
1 answer

get latitude and longitude from image camera Android

I need to pick up the longitude and latitude of an image taken by the camera. @Override public void onClick(View v) { Intent i= new Intent("android.media.action.IMAGE_CAPTURE"); startActivityForResult(i,TAKE_PHOTO); …
0
votes
2 answers

Take photos from front-facing and rear cameras on android 2.2

I'm designing an app (on version 2.2) that use the camera to capture photos. I read from http://developer.android.com/sdk/android-2.3.html that version 2.3 and above have multiple cameras support. But i'm still a bit confused because when the camera…
user1398267
  • 31
  • 1
  • 8
0
votes
4 answers

Forcing camera to take images in landscape mode

I have a camera application and i want that whenever the camera is opened , it takes images only in the landscape mode ?? How can i achieve this?? Intent ia = new…
Kumar
  • 169
  • 2
  • 5
  • 12
0
votes
3 answers

How to Pass camera image from one intent to other intent in android?

I am trying to send camera image from one intent to another intent to display. Currently i am trying using the following method, Once the image captured protected void onActivityResult(int requestCode, int resultCode, Intent data) { …
vinothp
  • 9,939
  • 19
  • 61
  • 103
0
votes
2 answers

Android camera activity is not initiating

This is a part of my code for a simple android camera application, public class CameraView extends Activity implements Callback, OnClickListener { static final int FOTO_MODE = 0; private static final String TAG = "CameraTest"; Camera…
P basak
  • 4,874
  • 11
  • 40
  • 63
-1
votes
1 answer

how to get exception when no camera in js

There's a web page for mobile and from js I can get access to the camera. One case I need to support is when there's no camera. So last week for such case I was getting exception sth like 'Could not start a video source' and added error handler.…
ra74
  • 129
  • 1
  • 10
-1
votes
1 answer

Colour simplification in live android camera feed

I'm trying to work out how to go about creating an on-the-fly simplification of incoming RGB values. I'm trying to write an android app that utilizes a live camera view and sample colors. I've worked out how to detect and save individual color…
-1
votes
1 answer

How the camera intent activity in Marshmallow and Nougat+ are different?

I have the below code for which is working in android 6 but while using it in android 7+ the application crashes with nullpointerexception. Intent intentfile = new Intent("android.media.action.IMAGE_CAPTURE"); …
-1
votes
1 answer

Android school project - error call camera Service

I'm working on a school project, I have a java server (pc) and an android client; I want to use my phone's camera as webcam on pc, so i want to make an android app that work in background and send the camera view to the pc server; I have made the…
silvio
  • 1
  • 5