gpt4 book ai didi

android - 什么 Intent 让 youtube android 应用程序在到达视频结尾时自动关闭

转载 作者:太空宇宙 更新时间:2023-11-03 12:52:23 26 4
gpt4 key购买 nike

我应该在 intent 上设置什么参数来启动 vnd.youtube 以使其在到达视频结尾时关闭 Activity 。在 Youtube API 中是这样的:

YouTubeIntents.createPlayVideoIntentWithOptions(getApplicationContext(), mVideoId, true, true);

我想知道直接启动 youtube Activity 的“finishOnEnd”选项的等效项,如下所示:

Intent viewIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube:" + mVideoId));
viewIntent.putExtra("force_fullscreen", true);
viewIntent.putExtra("force_finishOnEnd", true);
startActivity(viewIntent);

我发现“全屏”的等效项是“force_fullscreen”,但是“finishOnEnd”选项呢?

谢谢。

最佳答案

intent.putExtra("finish_on_ended", true);

关于android - 什么 Intent 让 youtube android 应用程序在到达视频结尾时自动关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28145142/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com