Android,如何添加我的应用程序以在用户单击电子邮件地址时显示

标签 android email drop-down-menu

使用 Android 时,当我在默认浏览器中单击电子邮件地址时,会弹出一个菜单列表,其中包含 Gmail(内置电子邮件客户端)和 K-9(另一个电子邮件应用程序)。

我想添加我的 android 应用程序以显示在此列表中。这可能吗?我该怎么做?

最佳答案

将此 intent-filter 添加到您的 manifest Activity 中:

        <intent-filter>
            <action android:name="android.intent.action.SENDTO" />
            <data android:scheme="mailto" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.SEND" />
            <data android:mimeType="*/*" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.SEND_MULTIPLE" />
            <data android:mimeType="*/*" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <data android:scheme="mailto" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
        </intent-filter>

关于Android,如何添加我的应用程序以在用户单击电子邮件地址时显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11678820/

相关文章:

javascript - 单击下拉菜单中的项目时,jQuery 不会触发

java - 删除节点的所有子节点,同时保留对 Firebase 中父节点的引用

email - 通过 mailgun 发送电子邮件时出错

javascript - 高级自定义字段/基于另一个 acf 字段填充选择

asp.net smtp 邮件队列

email - 拉维尔 5 : passing variable into subject

c# - DataReader + DropDownList ASP.NET 项目

javascript - Android Talkback 未注册 Web 版 onFocus。如何使用 Android Talkback 操作辅助功能焦点?

android - 好的http : SSLProtocolException: SSL handshake terminated

java - X 不活动量后如何锁定用户?