问题描述
我想将广播接收器用于使用ACTION_SEND类型的隐式意图".
i want to use a broadcast receiver for "implicit intents" who use the type ACTION_SEND.
这仍然是非常基本的,但是无论我尝试使用哪个应用程序的共享菜单",无论如何我的应用程序/接收器都不会出现.
It's still very basic but anyway my app/receiver already does not show up, no matter which app's "share menu" i try.
摘自AndroidManifest.xml:
excerpt from AndroidManifest.xml:
<receiver
android:name=".SaveReceiver" >
<intent-filter
android:icon="@drawable/ic_launcher"
android:label="YourDrive" >
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter
android:icon="@drawable/ic_launcher"
android:label="YourDrive" >
<action android:name="android.intent.action.SEND_MULTIPLE" />
</intent-filter>
</receiver>
我尝试设置mimeType,但是没有任何帮助.我必须设置一个特定的mimeType还是以后可以检查它(通过处理内容时的Java代码)?我在做什么错,因此我的应用程序不会显示在所有应用程序的共享菜单"中...
I've tried setting a mimeType, but nothing helps. Do I have to set a specific mimeType or can i just check it later on (via Java code when handling the content)? What am I doing wrong, so that my app doesn't show up in "Share menus" of all apps...
谢谢.
推荐答案
ACTION_SEND
是活动操作,不是广播操作.您无法使用BroadcastReceiver
接听startActivity()
呼叫.
ACTION_SEND
is an activity action, not a broadcast action. You cannot pick up startActivity()
calls with a BroadcastReceiver
.
您没有实施活动.
http://developer.android.com/training/sharing/receive.html
这篇关于广播接收器ACTION_SEND未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!