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" />
精彩评论