How do I add my app to the Android 'share photo' option? [duplicate]

我的未来我决定 提交于 2019-11-30 20:04:39

问题


Possible Duplicate:
Android Share Via Dialog

For example, when you hit share photo, it gives you a list of options to share through (Instagram, Messaging, Gmail, etc.). I want my app to appear under these 'share' options after it is installed to the device.

I tried searching for it on Google, but I'm unfamiliar with any of the terminology so my search result terms are worded too strangely to be specific.


回答1:


Add this intent filter to your activity in the manifest:

<intent-filter>
    <action android:name="android.intent.action.SEND" />
    <category android:name="android.intent.category.DEFAULT" />
</intent-filter>



回答2:


See this question on StackOverflow. In the question you will see what you have to add to the manifest and in the first answer you will find how to retreive the data in your activity.




回答3:


Read Adding an Easy Share action



来源:https://stackoverflow.com/questions/13350857/how-do-i-add-my-app-to-the-android-share-photo-option

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!