收藏
回答

APP分享链接到朋友圈,编辑时没有带上链接?



回答关注问题邀请回答
收藏

2 个回答

  • A-好牛软件沐
    A-好牛软件沐
    2020-10-20

    微信号:helaoshi8786,时间2020.10.20 09:33或09:34

    2020-10-20
    有用
    回复
  • Cjiang
    Cjiang
    2020-10-19

    你好,麻烦复现问题的时候在手机微信那里上传下日志: 我->设置->帮助与反馈右上角有个上报日志的入口,麻烦提供一下微信号,时间点(具体到分钟)。

    2020-10-19
    有用
    回复 4
    • A-好牛软件沐
      A-好牛软件沐
      2020-10-20
      微信号:helaoshi8786,时间2020.10.20 09:33或09:34,安卓手机有的会出现这样的问题。
      2020-10-20
      回复
    • Cjiang
      Cjiang
      2020-10-20回复A-好牛软件沐
      麻烦提供一些调用的代码看看
      2020-10-20
      回复
    • A-好牛软件沐
      A-好牛软件沐
      2020-10-20回复Cjiang
      package com.haoniu.schoolZT.view.dialog;
      import android.content.ClipData;
      import android.content.ClipboardManager;
      import android.content.Context;
      import android.view.LayoutInflater;
      import android.view.View;
      import android.widget.RelativeLayout;
      import android.widget.TextView;
      import com.haoniu.schoolZT.R;
      import com.haoniu.schoolZT.interfaces.OnCallBackListener;
      import com.haoniu.schoolZT.util.ShareUtil;
      import com.zds.base.Toast.ToastUtil;
      import cn.sharesdk.wechat.friends.Wechat;
      import cn.sharesdk.wechat.moments.WechatMoments;
      public class ShareDialog<T> implements View.OnClickListener {
          private T data;
          private Context context;
          private boolean shareCallback = false;
          private BaseDialog mBaseDialog;
          private String id;
          private ClipboardManager mClipboard;
          private String url;
          private OnCallBackListener mOnCallBackListener;
          private String title;
          private String content;
          private String imgUrl;
          public ShareDialog(Builder tBuilder) {
              this.context = tBuilder.context;
              this.data = (T) tBuilder.data;
              this.shareCallback = tBuilder.shareCallback;
              this.id = tBuilder.id;
              this.url = tBuilder.url;
              this.mOnCallBackListener = tBuilder.mOnCallBackListener;
              this.content = tBuilder.content;
              this.imgUrl = tBuilder.imgUrl;
              this.title = tBuilder.title;
              mBaseDialog = BaseDialog.getUnInstance();
          }
          public static class Builder<T> {
              private T data;
              private Context context;
              private boolean shareCallback = false;
              private String id;
              private String url;
              private OnCallBackListener mOnCallBackListener;
              private String title;
              private String content;
              private String imgUrl;
              public Builder setTitle(String title) {
                  this.title = title;
                  return this;
              }
              public Builder setContent(String content) {
                  this.content = content;
                  return this;
              }
              public Builder setImgUrl(String imgUrl) {
                  this.imgUrl = imgUrl;
                  return this;
              }
              public Builder setOnCallBackListener(OnCallBackListener onCallBackListener) {
                  mOnCallBackListener = onCallBackListener;
                  return this;
              }
              public Builder setUrl(String url) {
                  this.url = url;
                  return this;
              }
              public Builder setId(String id) {
                  this.id = id;
                  return this;
              }
              public Builder setShareCallback(boolean shareCallback) {
                  this.shareCallback = shareCallback;
                  return this;
              }
              public Builder setData(T data) {
                  this.data = data;
                  return this;
              }
              public Builder setContext(Context context) {
                  this.context = context;
                  return this;
              }
              public ShareDialog build() {
                  return new ShareDialog(this);
              }
          }
          public ShareDialog show() {
              View view = LayoutInflater.from(context).inflate(R.layout.dialog_share, null);
              RelativeLayout mRlWechat = view.findViewById(R.id.rllayour_wechat);
              RelativeLayout mRlWeFriend = view.findViewById(R.id.rllayour_friend);
              RelativeLayout mRlWeibo = view.findViewById(R.id.rllayour_weibo);
              RelativeLayout mRlQQ = view.findViewById(R.id.rllayour_qq);
              RelativeLayout mRlQQzone = view.findViewById(R.id.rllayour_qq_zone);
              RelativeLayout mRlCopy = view.findViewById(R.id.rllayout_copy);
              TextView mTvCancel = view.findViewById(R.id.tv_cancel);
              mRlWechat.setOnClickListener(this);
              mRlWeFriend.setOnClickListener(this);
              mRlWeibo.setOnClickListener(this);
              mRlQQ.setOnClickListener(this);
              mRlQQzone.setOnClickListener(this);
              mRlCopy.setOnClickListener(this);
              mTvCancel.setOnClickListener(this);
              mBaseDialog
                  .setLayoutView(view, context)
                  .setOnCancelClickListener(mTvCancel)
                  .isCancelable(true)
                  .bottomShow();
              return this;
          }
          @Override
          public void onClick(View v) {
              switch (v.getId()) {
                  case R.id.rllayour_wechat:
                      share(Wechat.NAME);
                      break;
                  case R.id.rllayour_friend:
                      share(WechatMoments.NAME);
                      break;
                  case R.id.rllayour_weibo:
                      break;
                  case R.id.rllayour_qq:
                      break;
                  case R.id.rllayour_qq_zone:
                      break;
                  case R.id.rllayout_copy:
                      if (null == mClipboard) {
                          mClipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
                      }
                      ClipData clip = ClipData.newPlainText("simple text",
                          "");
                      mClipboard.setPrimaryClip(clip);
                      ToastUtil.toast("复制成功");
                      break;
                  case R.id.tv_cancel:
                      break;
              }
              mBaseDialog.dissmissDialog();
          }
          private void share(String share_media) {
              ShareUtil.Builder builder = new ShareUtil.Builder<>()
                  .setContext(context)
                  .setSHARE_media(share_media)
                  .setUrl(url)
                  .setTitle(title)
                  .setContent(content)
                  .setImgUrl(imgUrl)
                  .setOnCallBackListener(new OnCallBackListener() {
                      @Override
                      public void callBack(Object o) {//分享成功回调
                          if (shareCallback && mOnCallBackListener != null) {//true 回调
                              mOnCallBackListener.callBack(id);
                          }
                      }
                  });
              builder.build().shareWeb();
          }
      }
      2020-10-20
      回复
    • Cjiang
      Cjiang
      2020-10-20回复A-好牛软件沐
      https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Share_and_Favorites/Android.html,你好,先按照文档进行自查。
      2020-10-20
      回复
登录 后发表内容
问题标签