1

I have successfully record a screen with MediaProjection api, but I want to record a specific layout/view in my activity not whole screen.

I followed these tutorials;

https://android.googlesource.com/platform/development/+/master/samples/ApiDemos/src/com/example/android/apis/media/projection/MediaProjectionDemo.java

https://github.com/mtsahakis/MediaProjectionDemo

abalta
  • 1,204
  • 1
  • 12
  • 21

1 Answers1

1

You can't record only a particular layout. Media Projection API directly gets the frame buffers from the GPU itself (which is the output from the surface flinger) which is everything that you see on the screen (including status bar, navigation bar and all overlays and stuff including the app you are trying to record.

saikrishna279
  • 135
  • 1
  • 10