问下安卓的分享功能,代码怎么写?
问下安卓的分享功能,代码怎么写? --------------------编程问答-------------------- http://dev.umeng.com/social/android/share/quick-integration友盟的快速分享 但是我基础差 还没实现 你若实现了 指点下 --------------------编程问答-------------------- 尽量用官方的吧,各个分项的都有sdk例子的 --------------------编程问答-------------------- 有很多第三方提供的接口,你可以去百度一下 --------------------编程问答--------------------final String lookupKey = mContactData.getLookupKey();
Uri shareUri = Uri.withAppendedPath(Contacts.CONTENT_VCARD_URI, lookupKey);
if (mContactData.isUserProfile()) {
// User is sharing the profile. We don't want to force the receiver to have
// the highly-privileged READ_PROFILE permission, so we need to request a
// pre-authorized URI from the provider.
shareUri = getPreAuthorizedUri(shareUri);
}
final Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType(Contacts.CONTENT_VCARD_TYPE);
intent.putExtra(Intent.EXTRA_STREAM, shareUri);
// Launch chooser to share contact via
final CharSequence chooseTitle = mContext.getText(R.string.share_via);
final Intent chooseIntent = Intent.createChooser(intent, chooseTitle);
try {
mContext.startActivity(chooseIntent);
} catch (ActivityNotFoundException ex) {
Toast.makeText(mContext, R.string.share_error, Toast.LENGTH_SHORT).show();
}
联系人的分享代码。
补充:移动开发 , Android