0

I am trying to get screenshot of an activity that contains hardware accelerated view's so , Is there a way to get a activity screenshot without using MediaProjection API or getting the hardware accelerated view's bitmap only ?

4

1 回答 1

1

您可以使用 PixelCopy API https://developer.android.com/reference/android/view/PixelCopy

public static void request (SurfaceView source, 
            Bitmap dest, 
            PixelCopy.OnPixelCopyFinishedListener listener, 
            Handler listenerThread)
于 2020-11-23T09:41:47.533 回答