jraska/Falcon

Screenshot is Blank for Surfaceview

sachinmutthe opened this issue · 4 comments

Hi,

I have used your library for testing but it's saving blank for surface views.

Hello, thank you for using my library.

SurfaceView is kind of special View providing basically just transparent drawing region for some other component to draw and another thread is drawing into it as you can see here:
http://developer.android.com/reference/android/view/SurfaceView.html

May you please try postpone taking the screenshot to SurfaceHolder.Callback or even later, because when the SurfaceView is created, it is blank until those async callbacks are executed.

I will have a look into it in about a week and will come back to you, but maybe just the things described above will help.

Hello again, I tried it with SurfaceView and the screenshots are not taken, since SurfaceView is often drawn from native code (for example Camera preview) and therefore it is sadly not possible for Falcon to capture this without going to native code. I tried few workarounds, but from the nature of issue I believe it is not possible.
I will be happy if anyone finds a way for accessing it without using native code or root permissions.

I will close this issue in few days if there is nothing more to discuss.

How could you close this issue without providing a solution?
There must be an update with solution for camera screen shot.

Hi @zohaib1sahni, which solution would you suggest?

The issue was closed as there is no known ways for Falcon how to access this kind of views, which draw from native code and do not paint anything on View#onDraw(Canvas), which is how Falcon captures the screenshots.