gpt4 book ai didi

android 在应用程序/Activity 中嵌入默认音频播放器

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

我想知道是否可以将默认音频播放器嵌入到我的某个 Activity 中。或者至少能够嵌入具有播放/暂停按钮和音轨搜索栏的部分。

我想嵌入它而不是在新 Intent 中打开它的原因(像这样:

Intent audioActivity = new Intent(Intent.ACTION_VIEW);
audioActivity.setDataAndType(Uri.parse(getAudioURL()), "audio/*");
startActivity(audioActivity);

)

是我希望用户能够在收听音频的同时阅读当前 Activity 中的一些内容。我已经能够使用根据音轨进度更新的进度条,但这看起来不太好,我宁愿拥有默认音频播放器的外观。我知道默认的视频/音频播放器没有很好的记录,但如果可能的话,我想知道。谢谢!

最佳答案

Hi, I would like to know if it is possible to embed the default audio player into one of my activities.

不,对不起。

首先,没有像“默认音频播放器”这样的单一实体。每个设备都有自己的“默认音频播放器”。

第二,即使有一个通用的“默认音频播放器”,Android 也无法将其他应用程序的 UI 嵌入到您自己的 UI 中。

Or at least be able to embed the section that has the play/pause button and the audio track seek bar.

不,对不起。见上文。

关于android 在应用程序/Activity 中嵌入默认音频播放器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4963996/

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