可能重复: 的Android的Facebook / Twitter分享按钮
我创建一个应用程序,其中我想添加分享按钮,单击按钮时我的应用程序可以在Facebook和Twitter共享。请让我知道如果任何人有,我可以实现一个合适的答案。答案将是真正的AP preciated。
解决方案 意图emailIntent =新的意图(android.content.Intent.ACTION_SEND);
emailIntent.setType(text / plain的);
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,getResources()的getString(R.string.recommendation_subject));
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,getResources()的getString(R.string.recommendation_body));
startActivity(emailIntent);
会提示用户选择合适的应用程序与执行行动 (从安装在手机上)
Possible Duplicate: Android facebook/twitter share button
I am creating an app wherein i want to add share button , on clicking the button my app can be shared on facebook and twitter. Please let me know if anyone has a suitable answer which i can implement. Answers will be really appreciated.
解决方案Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("text/plain");
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, getResources().getString(R.string.recommendation_subject));
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, getResources().getString(R.string.recommendation_body));
startActivity(emailIntent);
Will prompt user to select appropriate application to perform action with (from installed on the phone)
上一篇:机器人:关于位图,内存使用情况和缩放位图、缩放、机器人、内存
下一篇:如何改变字体在Android的小工具用户自定义的字体"资产"该应用程序的文件夹?字体、自定义、应用程序、文件夹