Samsung S4 Video record using native camera issue - android

I am working on an application where user can capture a video using the phone's default camera. For that I have used the following intent
startActivityForResult(new Intent(MediaStore.ACTION_VIDEO_CAPTURE).putExtra(MediaStore.EXTRA_SIZE_LIMIT, maxLimit), Constants.INTENT_ID_RECORD_VIDEO);
It works fine in Samsung galaxy nexus, Lg nexus 4, Lenovo 260 etc. Upon launching the intent, in the above devices the camera opens in video mode and user can start recording the video directly, but in Samsung S4 device the camera opens in a mode where user has to again select video mode and then start recording.
Is there a way that it can be avoided.
Can any of you please provide any work around?
Please point me to any valid official documentation if this is an issue that can not be resolved.
Thanks in advance.

Related

Android Camera 2 API problems with flash on Nougat 7.1

Following the Camera 2 sample I've created simple camera class to capture the images. When it's okay with capturing both flash/non-flash images on any device with Android < 7.0, on mine Nexus 5X with Android 7.1 the same config fire the flash only once on the preview. Pre-sequences are the next:
for the preview I'm using CameraDevice.TEMPLATE_PREVIEW with AE mode set to CameraMetadata.CONTROL_AE_MODE_ON_ALWAYS_FLASH
the same I use for the capture still picture, but with CameraDevice.TEMPLATE_STILL_CAPTURE
If someone can help me with this case - I'll be really appreciated.
This is just additional information on the above issue. I wish to draw some attention to this problem!
My application takes a photo every 5 seconds. I (1) select the camera, (2) acquirer a session and then with each loop I (3) create a Capture request in which I set the Flash Mode and call the capture method on the session.
I have no issues with my Samsung SM-G550T (Android version 6.01), but I was having some issues with the Flash Mode on my Moto G4 (Android version 7.0). I got both phones to Flash, but only with this setting:
CaptureRequest.Builder requestBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_STILL_CAPTURE);
requestBuilder.set(CaptureRequest.FLASH_MODE, CaptureRequest.FLASH_MODE_SINGLE);
I am presently having an issue with a LG device (M210N) (Android version 7.0). Using the settings I stated above I get the device to flash just once. If I completely re-initialize the camera (as described above) the device will flash again only once.
If I add the CONTROL_AE_MODE_ON_ALWAYS_FLASH setting to the above requestBuilder, then the LG does not flash at all. So I had to remove that flag.
I have tried many different additional settings and combination for settings and none of them have eliminated this issue. I wonder how many devices are affected by this issue.

Cordova media capture plugin bugs (Nexus 6, Android 6)

I'm experience four separate bugs with the official cordova media capture plugin on a Nexus 6 phone running Android 6.
Some of these bugs did not occur on the Nexus 6p. So I know there may be some phone specific issues here. Any help would be greatly appreciated.
Bug 1
open app at portrait orientation
then rotate to landscape
press record, then stop
notice how video preview is rotated in wrong orientation
Bug 2
open app
change camera facing from rear to front
notice how you can't click record button now
Bug 3
open app at portrait orientation
press record, then stop
accept video, and notice video cannot be played in a video player
Bug 4
open android Photos app
notice how videos are not shown in gallery
restart phone and reopen Photos app to see them
Plugin
https://github.com/apache/cordova-plugin-media-capture
Demo to replicate bugs
https://github.com/kmturley/cordova-media-capture-example
Fixed by updating to Android 6.0.1

Take picture fails in dual camera mode

I'm having some issues when I'm in dual shot mode.
This is what I've got so far:
back camera mode - works perfectly
front camera mode - works perfectly
parallel camera mode (full back preview + small window front preview) - works perfectly on the devices that support accessing both cameras at the same time (like Samsung S4).
The problem is: while having both previews display, I call takePicture() method on BOTH cameras. It works perfectly on devices like Samsung S4 and HTC M8, but on LG G3 the takePicture() on the back camera just doesn't work. It doesn't even enter any of the callbacks. The front picture is taken correctly, but the back camera isn't, and then it freezes and I get a camera error 100, while the front camera keeps working fine.
I mention that all the above devices (S4, M8, and G3) support parallel cameras. The problem is only at G3 when I want to takePicture.
I've also tested on Nexus 5 which does not support and I've implemented a different approach which works great (basically, I take pictures one at a time).

unable to stream mp4 on galaxy nexus jelly bean

i'm having trouble trying to find a video player to play a stream for my app on a galaxy nexus.
it works on every other phone apart from nexus.
if i dont give the app the tag to tell it that it's a video in the url it gives me an options screen to choose what to complete the action with, in this list it doesn't show a video player. (if i state that it is a video i get a class not found exception)
anyone know what the issue is? as i said it's working on other phones apart from nexus, even works on galaxy s3
thanks

How to run zxing apps on avd

I m new to android
i have installed BarcodeScanner3.72.apk on MY AVD for testing if it works or not
My AVD Camera is working properly i can get image with it.
But whenever i start Barcode Scanner app it shows black and white background
I am not getting whats the problem.
One more thing i have also install same app on My Samsung Galaxy but it can't read barcode.
is there anything that i should keep in mind to use barcode app on samsung Galaxy!!
Sorry for my english !!!!!
Thanks
There is no camera preview available in the AVD, so the black and white pattern you see is normal, and just the AVD's fake video stream.
Tom Gibara has posted the famous and canonical way to slip a live video feed into code that's running on the AVD. YOu would need to modify the Barcode Scanner source for this to work.
Barcode Scanner works well on the Samsung Galaxy, I'm not sure what issue you're having.

Categories

Resources