开发者

How can I add my Android App to Share Dialog?

开发者 https://www.devze.com 2023-02-12 07:43 出处:网络
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 handl

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

精彩评论

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