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.
Related
I am on Android Studio Chipmunk (2021.2.1 Patch 2) and using the Pixel 5 emulator.
I have an Android app that allows the user to enter the gallery and select photos - one or many. Using the Pixel 3 emulator everything works like it should. I can grab as many or as few images as I like. Just click to leave a blue check and when done, select done. Also worked fine on the Pixel 3 physical phone I had at the time.
With the Pixel 5 emulator it allows me to select 1 image only. Long click does nothing. Any tips or tricks to get the emulator to allow the user to select in excess of 1 image?
I'm on a MacBook
In lieu of finding a more recent pixel to use I created a new device in device manager that is a "phone" running on API 33. Multiple select worked just fine on this "custom" device. I was able to accomplish the testing of the code on a more recent version of the API, which was my goal. Not sure what is up with the Pixel 5 emulator but there is a workaround.
In Pixel2 XL Android 8.1.0 , image captured in portrait mode using camera api is showing wrong resolution whereas image captured in landscape is showing right resolution.
Android Version: 8.1.0
Device tested: Google Pixel2 XL device
Steps to reproduce:
1. Capture image using Custom camera or open camera app available in play store which is using camera api in portrait mode.
2. Open file explorer to see image property.
3. Capture image in landscape mode.
4. Open file explorer to see image property.
Expected result:
In portrait mode it should show resolution as 3036x4048
Actual result:
In portrait mode it is showing resoultion as 4048x3036
NOTE:
This issue is not observed in Android 8.0 (O). Also the resolution info is correct if we capture image using device camera not using camera api.
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
I started working on IBM WorkLite in Android. I made a project and put a image in body background. the pic is according to the device size but on running app the image shown in zoom mode. I am unable to understand that why this is happening
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?