android - 让我的 android 应用程序出现在共享列表中

标签 android android-intent share intentfilter

<分区>

如何让我的申请出现在这里? :

enter image description here

一些信息促使我将此代码放在我的 Manifest 中(请参阅下面的代码),但它不起作用。问题是,如果我想从我的图库中分享一张图片,我想在共享列表中的应用程序列表中看到我的应用程序。任何指针?请帮忙。

<activity
        android:name="com.my.package.MyIntent"
        android:label="@string/app_name"
        android:screenOrientation="portrait" >
        <intent-filter>
            <action android:name="android.intent.action.ALL_APPS" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:mimeType="text/plain" />
        </intent-filter>
    </activity>

谢谢你:)

最佳答案

试试这个

       <activity
        android:name="yourActivity"
        android:icon="@drawable/ic_launcher"
        android:label="test">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

       <intent-filter>
            <action android:name="android.intent.action.SEND" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:mimeType="image/*" />
        </intent-filter>

        <intent-filter>
            <action android:name="android.intent.action.SEND" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:mimeType="text/plain" />
        </intent-filter>

        <intent-filter>
            <action android:name="android.intent.action.SEND_MULTIPLE" />

            <category android:name="android.intent.category.DEFAULT" />

            <data android:mimeType="image/*" />
        </intent-filter>
    </activity>

有关更多信息,请访问 Receiving Simple Data from Other AppsSending Simple Data to Other Apps

关于android - 让我的 android 应用程序出现在共享列表中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23424088/

相关文章:

android - 一个用于 Eclipse 和 Android Studio 的 Android 项目

android 位置 :absolute, overflow-y:scroll 和 -webkit-overflow-scrolling:touch 非常不稳定

java - Android Activity 仅在主 Activity 中显示并且未正确显示

visual-studio - 在两种解决方案中共享 aspx 文件

android-maven-plugin 3.2.0 与 maven 3.0.4 无法编译

java - Intent Bundle 每次都返回 Null?

android - 从 BroadcastReceiver 接收时 Intent 中缺少额外内容

android - 从其他应用程序中检索内容的文件名

google-maps - 根据坐标创建 Google map 链接

javascript - 如何删除 Facebook 分享按钮上的分享数量