2 newcichang newcichang 于 2014.07.29 10:29 提问

Android的qq分享,不知道怎么分享纯文本?
    final Bundle params = new Bundle();
    params.putString(QQShare.SHARE_TO_QQ_TITLE, "12308汽车票");
    params.putString(QQShare.SHARE_TO_QQ_TARGET_URL, "");
    params.putString(QQShare.SHARE_TO_QQ_SUMMARY, "12308是全国长途汽车客运的互联网平台,收录了全国200个城市,3000个汽车站的长途客运数据,为国内的旅客提供班次信息查询、汽车站信息查询以及汽车票预定服务。官网链接:http://www.12308.com");
    params.putString(QQShare.SHARE_TO_QQ_IMAGE_URL, "");
    params.putString(QQShare.SHARE_TO_QQ_APP_NAME, "12308汽车票");
    params.putInt(QQShare.SHARE_TO_QQ_KEY_TYPE, QQShare.SHARE_TO_QQ_TYPE_DEFAULT);

    params.putInt(QQShare.SHARE_TO_QQ_EXT_INT, 0x00);
    doShareToQQ(params);

private void doShareToQQ(final Bundle params) {
final Activity activity = this.activity;
new Thread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
mQQShare.shareToQQ(activity, params, new IUiListener() {

                @Override
                public void onCancel() {

// if(shareType != QQShare.SHARE_TO_QQ_TYPE_IMAGE){
//// Util.toastMessage(activity, "onCancel: ");
// }
}

                @Override
                public void onComplete(Object response) {
                    // TODO Auto-generated method stub

// Util.toastMessage(activity, "onComplete: " + response.toString());
}

                @Override
                public void onError(UiError e) {
                    // TODO Auto-generated method stub

// Util.toastMessage(activity, "onError: " + e.errorMessage, "e");
}

            });
        }
    }).start();
}
Csdn user default icon
上传中...
上传图片
插入图片