I was working on an app that included camera preview, and with my old phone running 1.6 I could take screenshots with DDMS. After getting a new phone with FroYo and updating to the latest SDK on the same dev machine, the camera preview layer is black when I do a screen capture. I have an overlay layer on top, and that shows just fine. The app runs fine on my phone and shows the preview as expected, it's just not showing up in screen caps.
Is there something I can look for in the debug output? Is this a known issue that others are experiencing?
Related
I use the following code to implement screen capture function with a device which has root access.
executeAsRoot(new String[]{ "/system/bin/screencap -p " + "/sdcard/img.png" });
This code work perfect with Android 4 but fail with Android 9. I means the picture of the screen can be captured , but if the screen contains a video, then the area will be a black rect.
I've also test with the screen capture function by the debug tool in Android studio (which with a camera icon). With a simulator, the video part can be captured successfully, but with the physical device it shows black rect. Both the simulator and physical are Android 9.
When I install the app. using ZXingScannerView library I got unexpected white screen instead of the camera preview.
P.S. run-time permission for the camera guaranteed to open camera from registration screen before going to QR scree. Also, i tried to open it from settings. none of theses work.
Samsung Galaxy S6
OS : Android 6.0.1
It is my first question on stack overflow, forgive me if i have missed guide.
I have installed android studio 1.0.1 on my macbook air and run the avd.
I have added front and backend camera as emulated.
when i click default camera app of emulator, it shows me blurry screen , no picture view.
First i have tried to search out as much as i can do. no topic found about error related to me. thats why i have posted my question here. hope senior don't mind.
The screenshots show my avd setting for camera and avd camera app interface:
http://isb.nu.edu.pk/nusoap/maria/images/esetting.png
http://isb.nu.edu.pk/nusoap/maria/images/camera.png
I have followed these links, but my problem not resolved.
Android Camera facing front not working in emulator
Camera on Android Eclipse emulator:
unfortunately camera has stopped android emulator
Camera not working in android emulator 4.2.2, windows 8
Why the dafault camera not working in android emulator?
It works as it should, if you want to see picture use webcam instead of emulated. (Emulated shows black-grey grid)
I am using the CWAC-Camera library within my Android application. Recently it was upgraded to v0.6.3, but since then I have noticed that rotation of images doesn't seem to work as expected.
I am starting a CameraFragment within an Activity that is locked to landscape orientation, and have observed the rotation is not correct for an output image with or without setting CameraFragment.lockToLandscape(true). I have managed to reproduce this in the demo application when the "Lock to Landscape" is checked (steps and a screenshot provided below). I have been testing on a Nexus 4 and Nexus 5 both running Android 4.4.2.
Has anyone else experienced this issue since upgrading to v0.6? Previously we were using 0.5.4 which didn't seem to have this issue, but looking at the release log I see there has been a lot of changes to EXIF data/rotation etc.
Steps to reproduce in demo app:
Open application, hold phone portrait or landscape
Select "Lock to Landscape" and "Single shot mode" from menu
Turn phone landscape (if started off portrait in step 1)
Capture image, appears rotated as per screenshot.
Cheers
For the record, this bug was fixed in v0.6.4 of the library.
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.