Xamarin.Android - PictureInPicture Sample

This sample demonstrates basic usage of the new Picture-in-Picture (PiP) mode for handheld devices introduced in Oreo. The sample plays a video which continues uninterrupted while switching back and forth between display modes or other activities.


Tap the button to drop in to Picture-in-Picture mode. Tapping on the PiP view will present controls which can be used to pause, show info, return to full screen, or exit the application.

Build Requirements

Using this sample requires the Android 8.0 (API 26) and Xamarin.Android 7.5.x or higher.

PictureInPicture Sample application screenshot


Ported from Android PictureInPicture Sample.

Original copyright (c) 2017 The Android Open Source Project, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.