I am trying to implement a picture-in-picture mode in my app similar to what we see when we click a youtube link in Whatsapp. Is it possible to create a similar view in our app.
Currently I'm letting Android to set my default screen size. This is the code segment :
final PictureInPictureParams.Builder pictureInPictureParamsBuilder =
new PictureInPictureParams.Builder();
pictureInPictureParamsBuilder.build();
enterPictureInPictureMode(pictureInPictureParamsBuilder.build());
The above mentioned code allows my video to play in a small picture-in-picture window. I want to view the video in a bigger pip screen. I tried setting custom aspect ratios but none of them increase the size of the pip window.
How can I solve this?
Thanks in advance!!