开发者

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. 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. Should be this one if I'm not wrong:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜