111
This commit is contained in:
@@ -67,7 +67,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
private String mProvinceVal;
|
||||
private String mCityVal;
|
||||
private String mZoneVal;
|
||||
private boolean isInto = false;
|
||||
private boolean isInto = true;
|
||||
private String isBind = "0", mobile = "";
|
||||
private boolean isName = false;
|
||||
|
||||
@@ -476,7 +476,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
}
|
||||
}
|
||||
});
|
||||
getTaskType();
|
||||
// getTaskType();
|
||||
if (isName) {
|
||||
isName = false;
|
||||
MainHttpUtil.getBaseInfo(CommonAppConfig.getInstance().getUid(), CommonAppConfig.getInstance().getToken(), new CommonCallback<UserBean>() {
|
||||
|
||||
@@ -13,6 +13,7 @@ import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.Message;
|
||||
import android.provider.Settings;
|
||||
import android.util.Base64;
|
||||
import android.util.Log;
|
||||
@@ -74,7 +75,13 @@ import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.bean.LiveBean;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.live.socket.SocketRyClient;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.dialog.LoginTipsDialog;
|
||||
import com.yunbao.main.http.MainHttpUtil;
|
||||
@@ -83,6 +90,9 @@ import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Arrays;
|
||||
|
||||
import io.rong.imlib.RongIMClient;
|
||||
import io.rong.message.TextMessage;
|
||||
|
||||
import static com.yunbao.common.CommonAppContext.logger;
|
||||
import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
|
||||
|
||||
@@ -654,75 +664,108 @@ public class EntryActivity extends AppCompatActivity {
|
||||
MainHttpUtil.getBaseInfo(new CommonCallback<UserBean>() {
|
||||
@Override
|
||||
public void callback(UserBean bean) {
|
||||
if (mFirstLogin) {
|
||||
//绑定广告渠道用户
|
||||
AdjustEvent adjustEvent = new AdjustEvent("s1or0t");
|
||||
adjustEvent.addCallbackParameter("userid", "bar");
|
||||
Adjust.trackEvent(adjustEvent);
|
||||
|
||||
//完成第三方登录
|
||||
if(mLoginType.equals("twitter")){
|
||||
AdjustEvent adjustEvent1 = new AdjustEvent("ea6lld");
|
||||
Adjust.trackEvent(adjustEvent1);
|
||||
CommonHttpUtil.setAdvertisingChannels("ea6lld", new HttpCallback() {
|
||||
gotoLive("97714");
|
||||
//
|
||||
// if (mFirstLogin) {
|
||||
// //绑定广告渠道用户
|
||||
// AdjustEvent adjustEvent = new AdjustEvent("s1or0t");
|
||||
// adjustEvent.addCallbackParameter("userid", "bar");
|
||||
// Adjust.trackEvent(adjustEvent);
|
||||
//
|
||||
// //完成第三方登录
|
||||
// if(mLoginType.equals("twitter")){
|
||||
// AdjustEvent adjustEvent1 = new AdjustEvent("ea6lld");
|
||||
// Adjust.trackEvent(adjustEvent1);
|
||||
// CommonHttpUtil.setAdvertisingChannels("ea6lld", new HttpCallback() {
|
||||
// @Override
|
||||
// public void onSuccess(int code, String msg, String[] info) {
|
||||
// if(code == 0) {
|
||||
// mFirebaseAnalytics.logEvent("FS_reg_twitter", null);
|
||||
// logger.logEvent("FB_reg_twitter");
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// }else if(mLoginType.equals("facebook")){
|
||||
// AdjustEvent adjustEvent1 = new AdjustEvent("5jbk95");
|
||||
// Adjust.trackEvent(adjustEvent1);
|
||||
// CommonHttpUtil.setAdvertisingChannels("5jbk95", new HttpCallback() {
|
||||
// @Override
|
||||
// public void onSuccess(int code, String msg, String[] info) {
|
||||
// if(code == 0) {
|
||||
// mFirebaseAnalytics.logEvent("FS_reg_fb", null);
|
||||
// logger.logEvent("FB_reg_fb");
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// }else if(mLoginType.equals("google")){
|
||||
// AdjustEvent adjustEvent1 = new AdjustEvent("krap47");
|
||||
// Adjust.trackEvent(adjustEvent1);
|
||||
// CommonHttpUtil.setAdvertisingChannels("krap47", new HttpCallback() {
|
||||
// @Override
|
||||
// public void onSuccess(int code, String msg, String[] info) {
|
||||
// if(code == 0) {
|
||||
// mFirebaseAnalytics.logEvent("FS_reg_google", null);
|
||||
// logger.logEvent("FB_reg_google");
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// }else if(mLoginType.equals("line")){
|
||||
// AdjustEvent adjustEvent1 = new AdjustEvent("uaacbn");
|
||||
// Adjust.trackEvent(adjustEvent1);
|
||||
//
|
||||
// CommonHttpUtil.setAdvertisingChannels("uaacbn", new HttpCallback() {
|
||||
// @Override
|
||||
// public void onSuccess(int code, String msg, String[] info) {
|
||||
// if(code == 0) {
|
||||
// mFirebaseAnalytics.logEvent("FS_reg_line", null);
|
||||
// logger.logEvent("FB_reg_line");
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// if (CommonAppConfig.IS_GOOGLE_PLAY == true) {
|
||||
// EntryActivity.this.startActivity(new Intent(EntryActivity.this, OneLoginActivity.class));
|
||||
// }else{
|
||||
// gotoLive("97714");
|
||||
// MainActivity.forward(EntryActivity.this, false);
|
||||
// }
|
||||
// } else {
|
||||
// MainActivity.forward(EntryActivity.this, false);
|
||||
// }
|
||||
// EntryActivity.activity.finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private LiveRoomCheckLivePresenter mCheckLivePresenter;
|
||||
|
||||
private void gotoLive(final String live_id) {
|
||||
LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
|
||||
if (mCheckLivePresenter == null) {
|
||||
mCheckLivePresenter = new LiveRoomCheckLivePresenter(EntryActivity.this, new LiveRoomCheckLivePresenter.ActionListener() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if(code == 0) {
|
||||
mFirebaseAnalytics.logEvent("FS_reg_twitter", null);
|
||||
logger.logEvent("FB_reg_twitter");
|
||||
public void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk) {
|
||||
if (liveBean == null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
LiveAudienceActivity.forward(EntryActivity.this, liveBean, liveType, liveTypeVal, "", 0, liveSdk);
|
||||
|
||||
}else if(mLoginType.equals("facebook")){
|
||||
AdjustEvent adjustEvent1 = new AdjustEvent("5jbk95");
|
||||
Adjust.trackEvent(adjustEvent1);
|
||||
CommonHttpUtil.setAdvertisingChannels("5jbk95", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if(code == 0) {
|
||||
mFirebaseAnalytics.logEvent("FS_reg_fb", null);
|
||||
logger.logEvent("FB_reg_fb");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}else if(mLoginType.equals("google")){
|
||||
AdjustEvent adjustEvent1 = new AdjustEvent("krap47");
|
||||
Adjust.trackEvent(adjustEvent1);
|
||||
CommonHttpUtil.setAdvertisingChannels("krap47", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if(code == 0) {
|
||||
mFirebaseAnalytics.logEvent("FS_reg_google", null);
|
||||
logger.logEvent("FB_reg_google");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}else if(mLoginType.equals("line")){
|
||||
AdjustEvent adjustEvent1 = new AdjustEvent("uaacbn");
|
||||
Adjust.trackEvent(adjustEvent1);
|
||||
|
||||
CommonHttpUtil.setAdvertisingChannels("uaacbn", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if(code == 0) {
|
||||
mFirebaseAnalytics.logEvent("FS_reg_line", null);
|
||||
logger.logEvent("FB_reg_line");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == true) {
|
||||
EntryActivity.this.startActivity(new Intent(EntryActivity.this, OneLoginActivity.class));
|
||||
}else{
|
||||
MainActivity.forward(EntryActivity.this, false);
|
||||
}
|
||||
mCheckLivePresenter.checkLive(liveBean);
|
||||
} else {
|
||||
MainActivity.forward(EntryActivity.this, false);
|
||||
}
|
||||
EntryActivity.activity.finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -38,10 +38,12 @@ import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.tencent.imsdk.v2.V2TIMSDKConfig;
|
||||
import com.tencent.imsdk.v2.V2TIMSDKListener;
|
||||
import com.tencent.imsdk.v2.V2TIMUserFullInfo;
|
||||
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.adapter.ViewPagerAdapter;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.ChatRemarksBean;
|
||||
import com.yunbao.common.bean.ConfigBean;
|
||||
import com.yunbao.common.bean.LiveSvgGiftBean;
|
||||
@@ -55,7 +57,6 @@ import com.yunbao.common.http.CommonHttpConsts;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
@@ -72,6 +73,7 @@ import com.yunbao.common.views.AbsMainViewHolder;
|
||||
import com.yunbao.live.LiveConfig;
|
||||
import com.yunbao.live.activity.LiveAnchorActivity;
|
||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||
import com.yunbao.live.activity.PDLIiveChatActivity;
|
||||
import com.yunbao.live.bean.LiveBean;
|
||||
import com.yunbao.live.bean.LiveKsyConfigBean;
|
||||
import com.yunbao.live.http.LiveHttpConsts;
|
||||
@@ -358,26 +360,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
mViewPager.setCurrentItem(0);
|
||||
mTabButtonGroup.setCurPosition(0);
|
||||
isInstructor();
|
||||
RongcloudIMManager.addRongcloudIMOnReceiveMessageListener(new RongIMClient.OnReceiveMessageWrapperListener() {
|
||||
@Override
|
||||
public boolean onReceived(io.rong.imlib.model.Message message, int i, boolean b, boolean b1) {
|
||||
Log.e("wewe", message.getConversationType() + "112121");
|
||||
MessageIMManager.get(mContext).getSystemForRongcloud(message);
|
||||
//融云直播间聊天
|
||||
Message msg = Message.obtain();
|
||||
msg.what = Constants.SOCKET_WHAT_BROADCAST;
|
||||
if (message.getContent() instanceof TextMessage && !"".equals(message.getContent()) && message.getContent() != null) {
|
||||
TextMessage content = (TextMessage) message.getContent();
|
||||
if (content.getContent().contains("_method_")) {
|
||||
msg.obj = content.getContent();
|
||||
if (SocketRyClient.mSocketHandler != null) {
|
||||
SocketRyClient.mSocketHandler.sendMessage(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1071,13 +1054,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
public void onMessageIMEvent(MessageIMEvent event) {
|
||||
messageNumber = event.getNumber();
|
||||
if (event.getNumber() > 0) {
|
||||
if (event.getNumber() > 99) {
|
||||
v_table_redpoint.setText("99+");
|
||||
} else {
|
||||
v_table_redpoint.setText(event.getNumber() + "");
|
||||
}
|
||||
v_table_redpoint.setVisibility(View.VISIBLE);
|
||||
|
||||
v_table_redpoint.setText(event.getNumber() + "");
|
||||
} else {
|
||||
v_table_redpoint.setVisibility(View.GONE);
|
||||
v_table_redpoint.setText("");
|
||||
|
||||
@@ -508,9 +508,9 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
} else if (i == R.id.rt_setting) {
|
||||
forwardSetting();
|
||||
} else if (i == R.id.lt_noble) {
|
||||
Constants.isTitle = false;
|
||||
Constants.isTitle = true;
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid();
|
||||
String url = CommonAppConfig.HOST + "/h5/Nobility.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid();
|
||||
ZhuangBanActivity.forward(mContext, url, false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user