Questions tagged [android-camera]

0

votes
0

answer
6

Views

How access pictures after they have been taken by camera used by other app

I have an idea for an android service, and I need to be able to access pictures before they're being taken, to save GPSlocation, moreover, I need also an access to the picture immediately afterwards. Is there any proper way to do it ?
adam17238
1

votes
1

answer
1k

Views

Android app crashes when calling any explicit intent (like camera/gallery, call or share) on Samsung galaxy s3

I have compileSdkVersion and targetSdkVersion 23 and testing on Samsung galaxy s3. But whenever i open any third party app (explicit intent) like camera/gallery app or share intent (gmail, email) or dialer app and comeback to my app by pressing back button or (in case of camera/gallery app by select...
Nouman Bhatti
1

votes
1

answer
33

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('android.media.action.IMAGE_CAPTURE'); only disables the button but its still being shown, Thanks!
Coder123
1

votes
0

answer
200

Views

how do I reduce the size of the video captured using camera

How do I reduce the size of the video captured using cordova media plugin. Current Resolution and file size for 2-minute duration in Samsung Galaxy Tab S in 3 different resolutions is mentioned below. I tried quality option in captureVideo method but that is depending on the device resolution. (640...
Sharon
1

votes
0

answer
632

Views

Xamarin Android live stream video/audio from device in c#

I am challenged with the task to stream video and audio (camera and mic) from my android API 19 devices directly to a server. Displaying (on the device) is also optional. Following this link I learned that you can use Mediarecorder with a socket instead of an output file. But they describe this meth...
b.holz
1

votes
0

answer
75

Views

How to set camera of android device as source type for javascript?

So, I am making an AR-application and have some basic code which runs fine on a pc-browser. The piece of code that activates the webcam is the following: //handle arToolkitSource var arToolkitSource = new THREEx.ArToolkitSource({ // to read from the webcam sourceType : 'webcam', }) When I use an...
Kanerva Peter
1

votes
0

answer
308

Views

Android camera2 dummy surface does not work

From Camera2Basic, I made a very small change that is to replace the texture surface with a dummy one: private SurfaceTexture mDummyPreview = new SurfaceTexture(10); private Surface mDummySurface = new Surface(mDummyPreview); ......... mPreviewRequestBuilder.addTarget(mDummySurface); and it doesn't...
Bob DV
1

votes
1

answer
452

Views

On some devices, Google Mobile Visions CameraSource returns low resolution image after calling takePicture

After I call: cameraSource.takePicture(null, pictureCallback); in the callback: private CameraSource.PictureCallback pictureCallback = new CameraSource.PictureCallback() { @Override public void onPictureTaken(byte[] bytes) { try { Log.d(DEBUG_TAG, 'On picture taken.'); if (bytes == null) { return;...
V.Bhat
1

votes
1

answer
301

Views

Continuously take still photo with android Camera2

From Camera2Basic example, I modified the code to make the program continuously takes still photo every 2 seconds. It runs fine but after a while it enters the same statecallback condition and does not take picture anymore: case STATE_WAITING_PRECAPTURE: { // CONTROL_AE_STATE can be null on some dev...
Bob DV
1

votes
0

answer
42

Views

blank page during taking a photo

I'm trying to do taking photo app (tutorial here ) but my camera doesn't want to work - it's only blank page, probably it's problem with Manifest or file-path but i can't figure out where i made a mistake. Important code in Manifest: android:maxSdkVersion='18' /> file_paths: and finally Activity cla...
martin123154
1

votes
0

answer
722

Views

android add_service([email protected]) fails- /dev/vndbinder permission denied

I'm working on HiKey aosp installed running on Linux 16.04, trying to connect v4l2 camera and use it. Currently, I've added the device drivers for v4l2 and usbcamera, and added the camera-hal to ~/(aosp)/device/linaro/hikey/camera directory. media_profiles.xml is contained in this directory. I'm fac...
wonderer
1

votes
0

answer
38

Views

How to attach photo with better resolution when sending mail Android

Hi so i made an application in wich i take a picture whit camera intent and save it in a bitmap and after that i compress it and take the path of the image and attach it but after testing it and send a test email i observed that the image is rather small (something like height:100px && width: 50px b...
1

votes
0

answer
209

Views

FileObserver not working with intent

I need to use camera intent and keep track of the new images taken by the intent. As I need to take multiple photos at a time, I used the intent MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA. Here is my code: package com.arko.cameraintent; import android.content.Intent; import android.os.Environment;...
Preetom Saha Arko
1

votes
1

answer
264

Views

Google Vision API CameraSourcePreview FPS

I am trying to develop android face recognition app. Starting from Google Vision API FaceTracker example - how can I get camera preview FPS value? I understand that I can set requested FPS on CameraSource.Builder() with setRequestedFps(), but I want actual FPS value updated every second or every ne...
Sleepwalker
1

votes
0

answer
194

Views

Android - Taking photo without user interaction

I am creating an Android app and need a feature that takes photos without user interaction. I simply want a class, for example, 'CameraService.java' that has a constructor that takes camera settings (eg. quality, res, etc) and a public function called 'takePhoto' which returns the image via type bit...
SillySam
1

votes
0

answer
146

Views

Camera stream (from getUserMedia) displayed in navigator but not in iframe

I have some problems to display the camera video stream of my emulator in an iframe. Aim: I am using navigator.mediaDevices.getUserMedia(constraints) to get the video stream from a device, display it on a webpage, and take a photo from the stream. Problem: When I open my webpage on a navigator I ca...
Maëva Grondin
1

votes
0

answer
350

Views

How to upload captured image from Camera to a webview

I have this html which works perfectly if I open it with chrome application and let the user to make a photo with the camera and upload it. After selecting the photo captured by the camera, the name of the file is displayed and with the submit button I can upload the photo. Select image to upload: T...
NullPointerException
1

votes
1

answer
245

Views

SurfaceView Camera App Switch Camera and Fix Dark Preview

I am building a camera app using surface view. The app loads the camera properly and image is captured. There are two scenarios in image capture: The image is captured and nothing i.e bytes array is sent to the preview activity. It works fine here. The image is captured and the byte array from pictu...
1

votes
0

answer
137

Views

How to find particular human parts on face in camera preview like Face Recognition - android

My requirement is detected human lips(like Detect the particular human parts on their face) and show some lipstick color and apply the lipstick on their face while they are trying to take a selfie in through my app. (in this feature already available in the YouCameMakup app). Now my problem is: I do...
Raja
1

votes
1

answer
63

Views

Pubnub deactive webcam but still stream

So I am using the sample pubnub Android Project and the sample pubnub web Project so that one can call from the webinstance to the Android user. That works so far, but the webuser needs to have a microphone to be able to call the Android user. In my case the web user shall only be able to see the An...
Jaan
1

votes
0

answer
256

Views

Can't create a folder in Gallery, external storage

I'm new in Android and I've follow this tutorial https://developer.android.com/training/camera/photobasics.html and I can't create folder in /storage/emulated/0/Pictures. private File createImageFile() throws IOException { // Create an image file name String timeStamp = new SimpleDateFormat('yyyyMMd...
Diogo Silva
1

votes
0

answer
40

Views

On back navigation samsung mobile showing black screen

I am adding camera functionality in my app. Capturing image from camera and to preview the image is working fine.But when I am pressing the back navigation from navigation bar to back from preview activity to camera activity it showing the black screen. I am able to capture the image but showing bla...
Mobile Test
1

votes
1

answer
72

Views

mCamera.takePicture(null, null, mPicture) does not work

I follow https://developer.android.com/guide/topics/media/camera.html to activate the custom camera for android 4 but my capture function are totally not working. Below is my code: cameraf.java: public class cameraf extends AppCompatActivity{ private Preview mPreview; private Camera mCamera; private...
Shi Jie Tio
1

votes
1

answer
648

Views

How to add a sticker in live android camera application?

I want to make simple sticker camera application. In Camera screen there will be a sticker and when the user press capture button it will capture the image with the sticker. Actually there will be two layers. One for camera picture and other for sticker.
Tarek Ahmed
1

votes
0

answer
118

Views

The camera crops the photos

My problem is that the built-in camera in my app is cropping all photos taken by itself. For comparison: (the first photo is screenshot of camera preview, second - captured photo), and same camera preview is smaller than normal camera preview.. Why? Code: public void surfaceChanged(SurfaceHolder ho...
Oktawian
1

votes
0

answer
502

Views

Permission Denial: starting Intent { act=android.media.action.IMAGE_CAPTURE cmp=android/com.android.internal.app.ResolverActivity }

Please help! Camera cannot open when i click it. I'm using android M, maybe that's the problem. please help me how to open the camera... I'm trying to add some permission but it still doesn't work. I'm already use ` but it still doesn't work. please help this is my code public class TambahLaporActiv...
Qube
1

votes
0

answer
83

Views

How to achieve fast focusing at lower frame rate in android camera or how to choose best frame rate

I am using Google mobile vision for Qr code detection and OCR which is supported by Camera APi(not camera2 api). I fixed frame rates to 15fps, but in some devices preview is very slow and takes too long say 5-6 seconds to focus but good low light visibility. If I change frame rate to 30fps preview...
Ajg Theta
1

votes
0

answer
119

Views

Triggering Android Camera from a webview, after gaining permissions to do so

I wonder if anyone would be able to explain this strange behaviour. I have a hybrid android app, that up to Android 5, successfully invoked a camera/folder dialog following a click on an html input element defined as follows: As part of my upgrade to Android 6, I replaced the onclick function with a...
Steve Brooker
1

votes
3

answer
88

Views
1

votes
0

answer
182

Views

TextureView stretch image

I'm using this library ( Download from Github then import project into my existing project ) to record to the video. Everything is working perfectly except camera preview while recording. camera preview is vertically stretch when device is portrait camera preview is horizontally stretch when device...
1

votes
0

answer
30

Views

Camera Orientation issue on OnPreviewCallback method

Hello i am implementing the ipStreaming code from here But issue is in 90 degree orientation [Working with portrait mode] video is flipped not in proper orientation. Solution tried:- 1.)nv21Converter Output is :- 2.) SO_Solution output is:- public static byte[] rotateNV21(final byte[] yuv, final...
Hardy
1

votes
1

answer
64

Views

Camera not being released properly on Astro Tab A10 running Marshmallow

I have the some of the following code to use the camera: @Override public void surfaceCreated(SurfaceHolder holder) { if (mCamera == null) { mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK); try { mCamera.setPreviewDisplay(mHolder); } catch (IOException e) { e.printStackTrace(); } } } pri...
Pink Jazz
1

votes
1

answer
63

Views

Android: How to store an image from camera and external storage into SQLite and also get it back again?

I have been trying to figure out how to store an image or the location of an image in a SQLite database. And then also get the image from the database back, as well. Here I have an activity that uses the camera. I've made comments in the code to explain my steps. I just need to see how to edit onAc...
Music Backup
1

votes
3

answer
58

Views

Camera intent issue with different phones android

I am calling camera intent to capture an image and get the image uri in onActivtyResult in my fragment. this is my captureImage() private void captureImage() { Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(intent, REQUEST_CAMERA_STORAGE); } this is my onActivity...
hasan_shaikh
1

votes
0

answer
91

Views

How to get images from android camera in RGB?

I want to develop a machine learning program using Tensorflow, OpenCV and Android. I already trained my model and uploaded it to my mobile, but I am facing problems when I want to feed the image taken with camera. The problem is that the camera is taking pictures with the format RGBa (which has 4 ch...
Laci Szakács
1

votes
1

answer
48

Views

Can't replace image view, for image from a camera or gallery (It doesn't work)

I Can't replace the image for other image from gallery or camera, when I show the images from my gallery and selected a image this doesn't replace the image. Also, when I intent capture a image with the camera this doesn't show and I can't take a picture. I want replace the image in a fragment and t...
1

votes
0

answer
21

Views

Zbar not releasing camera(issue on kitkat) android

I am having a screen where i am using zbar to scan barcode, after that, is start a new activity onto which i take picture using surfaceView. But in second activity camera is giving an exception RuntimeException: Cannot connect to camera service. Any suggestions are welcome. Manifest: It is working f...
Ashwani
1

votes
1

answer
181

Views

getNumberOfCameras() always returns 0

I'm having a problem with the Android Camera API. I was debugging because camera=Camera.open() always returned null, while permissions were configured in android.Manifest, and the rear camera was available. So I checked for the availability and the number of cameras Android found: Context context...
1

votes
1

answer
143

Views

wrong value for getX() & getY() when rotate view by pinch not activity

Here is what I'm trying to do. I have a camera view user can perform some process (scale, move, and rotate) I need when user capture an image put it in the same location of the camera box with the applied process on a camera view I'm doing it as follows mCameraView is the cameraview and mCaptureIma...
1

votes
1

answer
51

Views

Android: nullponterException after activating camera

I am developing simple drawing application for android. My goal is to: open camera from my application take a photo draw this photo into canvas draw over this photo After activating camera: Intent takePhoto = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (takePhoto.resolveActivity(getPackageMan...
maxell35

View additional questions