Example usage for android.content.pm PackageManager FEATURE_PICTURE_IN_PICTURE

List of usage examples for android.content.pm PackageManager FEATURE_PICTURE_IN_PICTURE

Introduction

In this page you can find the example usage for android.content.pm PackageManager FEATURE_PICTURE_IN_PICTURE.

Prototype

String FEATURE_PICTURE_IN_PICTURE

To view the source code for android.content.pm PackageManager FEATURE_PICTURE_IN_PICTURE.

Click Source Link

Document

Feature for #getSystemAvailableFeatures and #hasSystemFeature : The device supports picture-in-picture multi-window mode.

Usage

From source file:android.support.v17.leanback.supportleanbackshowcase.app.media.VideoExampleActivity.java

public static boolean supportsPictureInPicture(Context context) {
    return BuildCompat.isAtLeastN()
            && context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_PICTURE_IN_PICTURE);
}

From source file:com.example.android.leanback.VideoActivityWithDetailedCard.java

/**
 * Helper function to determine if picture in picture mode is supported or not
 * @param context current context//from   w w  w.j a v a2 s.  c o  m
 * @return if Picture in Picture mode is supported or not
 */
public static boolean supportsPictureInPicture(Context context) {
    return BuildCompat.isAtLeastN()
            && context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_PICTURE_IN_PICTURE);
}