在移动社交分享社交

2023-09-04 06:05:43 作者:你是我吸到肺里的烟、

在一个网站上,人们可以使用一个社会共享的JavaScript库,如前页,以便提出共享按钮的用户无需编程,一切从头开始。

On a website, one can use a social sharing javascript library like addthis in order to propose share buttons to the user without having to program everything from scratch.

你知道任何库直接做同样的事情Android应用程序里面?

Do you know any library doing the same sort of thing directly inside an android application ?

推荐答案

在Android上,我们有意图这一点。 如果你想给用户一个机会来分享的东西,你能火起来像这样的意图,例如:

On Android we have Intents for this. If you like to give the user an opportunity to share something, you can fire up an intent like this for example:

Intent share = new Intent(Intent.ACTION_SEND);
share.setType("image/jpeg") // might be text, sound, whatever
share.putExtra(Intent.EXTRA_STREAM, pathToPicture);
startActivity(Intent.createChooser(share, "share"));
 
精彩推荐
图片推荐