如何通过列表中出现我在YouTube上分享的应用程序? [英] How to appear my app in YouTube share via list?

查看:124
本文介绍了如何通过列表中出现我在YouTube上分享的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

YouTube应用平板电脑有一个共享选项。例如:我在观看YouTube应用视频,然后点击按钮分享。蓝牙,G​​ooglemail电子邮件,和Dropbox出现我。我不知道我可以列出我的应用程序呢?其中意向滤波器我的应用程序有哪些?

在这里,我都试过了。但是,这不是为我工作。我使用Android的奇巧版本。

 <意向滤光器>
    <作用机器人:名字=android.intent.action.VIEW/>
    <作用机器人:名字=android.intent.action.SEND/>
    <类机器人:名字=android.intent.category.DEFAULT/>
    <类机器人:名字=android.intent.category.BROWSABLE/>
    <数据机器人:mime类型=音频/ */>
    <数据机器人:mime类型=视频/ */>
    <数据机器人:mime类型=文/ */>
    <数据机器人:计划=内容/>
    <数据机器人:计划=文件/>
&所述; /意图滤光器>


解决方案

您必须把这个意图过滤器的活动标签内你的清单文件...

 <意向滤光器>
        <作用
            机器人:名字=android.intent.action.SEND/>
        <类别
            机器人:名字=android.intent.category.DEFAULT/>
        <数据
            机器人:mime类型=图像/ */> / *写正确的类型* /
    &所述; /意图滤光器>

然后,你必须发展自己的活动从当前的意图处理数据的方式。

YouTube App for tablets has a sharing-option. For example: I watch a video in the YouTube app and click the button to share. Bluetooth, Googlemail, and Dropbox appear for me. I wonder how i can list my app there? Which intent-filter has my app to have?

Here i have tried. But this is not working for me. I am using Android Kitkat version.

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

解决方案

You have to put this intent filter inside an Activity tag in your Manifest file...

<intent-filter>
        <action
            android:name="android.intent.action.SEND" />
        <category
            android:name="android.intent.category.DEFAULT" />
        <data
            android:mimeType="image/*" /> /* WRITE THE CORRECT TYPE */
    </intent-filter>

Then you have to develop the way your Activity handles the data from the current intent.

这篇关于如何通过列表中出现我在YouTube上分享的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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