admin管理员组文章数量:1122832
I want to open the main UI and pip window at the same time in ReactNative.
Currently, when I enter the pip mode as shown below, the main UI switches to the pip screen as if it were the background and does not work as I want.
Rational rational = new Rational(16, 9);
PictureInPictureParams mParams =
null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
mParams = new PictureInPictureParams.Builder()
.setAspectRatio(rational)
.build();
enterPictureInPictureMode(mParams);
}
Is there anything else I need to set?
My MainActivity is as follows.
<activity
android:name=".MainActivity"
android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:supportsPictureInPicture="true"
android:windowSoftInputMode="adjustResize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.DOWNLOAD_COMPLETE"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="" />
</intent-filter>
</activity>
I tried using [email protected] and also tried to create a new activity and display it separately. In the former case, the window changed as described above, and in the latter case, it stopped because it did not operate properly. I saw that the method handled in react-native-video was not wrong when I saw the introduction of multi-window in Android and other articles, so I think it is a problem with my settings, so I am checking it. Even when I changed from 'SingleTask' to 'Standard', the behavior did not change.
本文标签: androidHow to display Picture in Picture along with the main UIStack Overflow
版权声明:本文标题:android - How to display Picture in Picture along with the main UI - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736283074a1926848.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论