Informatix Expert Licensed User Longtime User May 28, 2020 #1 I tried to capture a screenshot of a device emulated with Genymotion and the result is quite old and comes from another device (like I'm getting an old image stored in a cache). I used directly the ADB tool to check and the result is good so the problem comes from B4A.
I tried to capture a screenshot of a device emulated with Genymotion and the result is quite old and comes from another device (like I'm getting an old image stored in a cache). I used directly the ADB tool to check and the result is good so the problem comes from B4A.
Erel B4X founder Staff member Licensed User Longtime User May 28, 2020 #2 B4A calls ADB -s <serial> shell screencap <output file> to create a screenshot. If you are seeing an old screenshot then this command silently failed for some reason. Test it with a real device.
B4A calls ADB -s <serial> shell screencap <output file> to create a screenshot. If you are seeing an old screenshot then this command silently failed for some reason. Test it with a real device.
Toky Olivier Active Member Licensed User Longtime User May 28, 2020 #3 Me too, I encountered this issue many times (with my phones) not emulators. Finally, I used screen shot apps...
Me too, I encountered this issue many times (with my phones) not emulators. Finally, I used screen shot apps...
Informatix Expert Licensed User Longtime User May 28, 2020 #4 Erel said: B4A calls ADB -s <serial> shell screencap <output file> to create a screenshot. If you are seeing an old screenshot then this command silently failed for some reason. Test it with a real device. Click to expand... With a real device it works. WIth ADB, I ran this command on the emulated device: adb -s 192.168.21.101:5555 shell screencap -p /sdcard/test.png and the result was good. With B4A, the created file is good (b4a_screenshot.png) but the file displayed in B4A is not the right one.
Erel said: B4A calls ADB -s <serial> shell screencap <output file> to create a screenshot. If you are seeing an old screenshot then this command silently failed for some reason. Test it with a real device. Click to expand... With a real device it works. WIth ADB, I ran this command on the emulated device: adb -s 192.168.21.101:5555 shell screencap -p /sdcard/test.png and the result was good. With B4A, the created file is good (b4a_screenshot.png) but the file displayed in B4A is not the right one.
Erel B4X founder Staff member Licensed User Longtime User May 28, 2020 #5 This means that it fails to "pull" the file from the device. What is the output of "adb devices"? Looks like the code will fail if there are multiple connected devices.
This means that it fails to "pull" the file from the device. What is the output of "adb devices"? Looks like the code will fail if there are multiple connected devices.
Informatix Expert Licensed User Longtime User Jun 3, 2020 #6 Erel said: This means that it fails to "pull" the file from the device. What is the output of "adb devices"? Looks like the code will fail if there are multiple connected devices. Click to expand... The problem is still there with a single connected device.
Erel said: This means that it fails to "pull" the file from the device. What is the output of "adb devices"? Looks like the code will fail if there are multiple connected devices. Click to expand... The problem is still there with a single connected device.