如何使用我自己的默认媒体播放器播放媒体
我是一名 Android 开发者。我开发了一个可以播放本地和流媒体视频的媒体播放器。但有一个问题。当我单击图库中的本地媒体时,如何将其配置为使用我的播放器播放?至少,应该有一个媒体播放器列表,包括我的媒体播放器,我应该能够从这个列表中选择它。成功后,我想用我的播放器默认打开 rtsp 协议文件。我该怎么做?等待您的帮助。
I am an Android developer. I've developed a media player that can play both local and streaming videos. But there is a problem. When I click a local media in the gallery how can I configure it to be played with my player? At least, there should be a list of media players including mine one and I should be able to choose it from this list. After succeeding this, I want to open rtsp protocoled files with my player as default. How can I do this? Waiting for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在寻找的称为意图过滤器。具体来说,您想要针对您正在播放的媒体类型设置一个意图过滤器,即数据类型意图过滤器。 Android SDK 中有更多相关信息。
What you are looking for is called an Intent Filter. Specifically, you want to set up an intent filter on the type of media you are playing, a data type intent filter. There is more information on this in the Android SDK.