由网友(等我变优秀)分享简介:可能重复: 的Android的Facebook / Twitter分享按钮 我创建一个应用程序,其中我想添加分享按钮,单击按钮时我的应用程序可以在Facebook和Twitter共享。请让我知道如果任何人有,我可以实现一个合适的答案。答案将是真正的AP preciated。解决方案 意图emailIntent...
可能重复: 的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)
相关推荐
最新文章