1.消息推送新增链接类型;

2.积分体系埋点补充邀请好友结果埋点
This commit is contained in:
lyr
2021-03-23 10:21:53 +08:00
parent c683e6786c
commit 5cc25482a9
7 changed files with 139 additions and 0 deletions

View File

@ -69,6 +69,8 @@ public class MessageShareUtils {
private PopupWindow mPopupWindow;
private Bitmap shareBm; //分享截图
private String picName;
private ShareWay shareWay;
private boolean isFromInviteFriends = false;
private String[] mArrLabel = {"微信好友", "朋友圈", "QQ好友", "QQ空间", "保存"};
@ -80,15 +82,39 @@ public class MessageShareUtils {
R.drawable.share_save
};
public enum ShareWay {
qq("qq"),
qqZone("qq空间"),
weibo("微博"),
wechat("微信"),
wechatMoments("朋友圈");
private String name;
ShareWay(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
//QQ或者QQ空间分享回调处理
public IUiListener QqShareListener = new IUiListener() {
@Override
public void onComplete(Object o) {
Utils.toast(mContext, "分享成功");
if (isFromInviteFriends) {
IntegralLogHelper.INSTANCE.logInviteResult("成功", shareWay.getName());
}
}
@Override
public void onError(UiError uiError) {
if (isFromInviteFriends) {
IntegralLogHelper.INSTANCE.logInviteResult("失败", shareWay.getName());
}
// 单分享图片不支持显示未安装弹窗,手动调出
if (mActivity != null) {
Activity activity = mActivity.get();
@ -109,6 +135,9 @@ public class MessageShareUtils {
@Override
public void onCancel() {
Utils.toast(mContext, R.string.share_cancel_hint);
if (isFromInviteFriends) {
IntegralLogHelper.INSTANCE.logInviteResult("取消", shareWay.getName());
}
}
};
@ -214,10 +243,16 @@ public class MessageShareUtils {
});
}
public void shareInviteFriends(Activity activity, String type) {
isFromInviteFriends = true;
shareFromWeb(activity, type);
}
public void shareFromWeb(Activity activity, String type) {
this.mActivity = new WeakReference<>(activity);
if ("weibo".equals(type)) {
shareWay = ShareWay.weibo;
weiboShare();
} else {
// base64转bitmap
@ -242,15 +277,19 @@ public class MessageShareUtils {
// 分享
switch (type) {
case "qq" :
shareWay = ShareWay.qq;
qqShare();
break;
case "qq_zone" :
shareWay = ShareWay.qqZone;
qZoneShare();
break;
case "wechat" :
shareWay = ShareWay.wechat;
wechatShare();
break;
case "wechat_moments" :
shareWay = ShareWay.wechatMoments;
wechatMomentsShare();
break;
case "save" :