如何显示和QUOT我自己的媒体播放器;使用&QUOT完整的行动;弹出玩耍文件通过我的媒体播放器 [英] How to show my own media player in "complete action using " pop up for play file by my media player

查看:167
本文介绍了如何显示和QUOT我自己的媒体播放器;使用&QUOT完整的行动;弹出玩耍文件通过我的媒体播放器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建的媒体播放器,播放mp3文件。但是,当我在任何MP3文件,点击它显示了一种弹出。它包含了所有的媒体播放器,而不是我自己的。请帮助显示它在弹出。

I am create media player that play mp3 file. But when i click on any mp3 file it shows one pop up. it contains all media player rather than my own. Please help to show it in that pop up.

推荐答案

您需要将以下意图过滤器添加到您的活动清单:

You'll need to add the following intent-filters to your activity in the manifest:

<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:scheme="content"/>
    <data android:scheme="file"/>
    <data android:mimeType="audio/*"/>
</intent-filter>

如果您希望您的应用程序显示只为MP3文件,试试这个:

If you want your app to show up only for mp3 files, try this:

<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="audio/mp3" />  
    <data android:pathPattern="*.mp3" />
</intent-filter>

要了解更多关于意图过滤器:链接

To read more on intent filters: Link.

这篇关于如何显示和QUOT我自己的媒体播放器;使用&QUOT完整的行动;弹出玩耍文件通过我的媒体播放器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆