简体   繁体   English

如何将我的Android应用程序添加到共享对话框?

[英]How can I add my Android App to Share Dialog?

I want to add my App to "Share via" Dialog. 我想将我的应用程序添加到“分享通过”对话框。 How can I do this? 我怎样才能做到这一点?

You need to add an intent filter to the manifest file, specifying an action and mime type your application should handle. 您需要向清单文件添加intent过滤器,指定应用程序应处理的操作和mime类型。 Something like this: 像这样的东西:

<intent-filter>
  <action android:name="android.intent.action.SEND" />
  <data android:mimeType="audio/*" />
</intent-filter>

You have to add the appropriate Intent filter to your Activity. 您必须向Activity添加适当的Intent过滤器。 Should be this one if I'm not wrong: 如果我没错,应该是这个:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM