111
This commit is contained in:
parent
5c42767ea3
commit
aac51d423c
@ -25,6 +25,8 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
private final static String KEY_USER_INFO = "keyUserInfo";
|
private final static String KEY_USER_INFO = "keyUserInfo";
|
||||||
private static IMLoginManager manager;
|
private static IMLoginManager manager;
|
||||||
private IMLoginModel userInfo;
|
private IMLoginModel userInfo;
|
||||||
|
private final static String isNewUserGif = "isNewUserGif";
|
||||||
|
private final static String isNewUserOne = "isNewUserOne";
|
||||||
|
|
||||||
|
|
||||||
//根据用户信息
|
//根据用户信息
|
||||||
@ -37,20 +39,20 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
}
|
}
|
||||||
//新用戶是否送了禮物
|
//新用戶是否送了禮物
|
||||||
public boolean isNewUserGif(){
|
public boolean isNewUserGif(){
|
||||||
return getBoolean("isNewUserGif",false);
|
return getBoolean(isNewUserGif,false);
|
||||||
}
|
}
|
||||||
//新用戶是否送了禮物
|
//新用戶是否送了禮物
|
||||||
public void setNewUserGif(boolean t){
|
public void setNewUserGif(boolean t){
|
||||||
put("isNewUserGif",t);
|
put(isNewUserGif,t);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否新用户第一次進直播間
|
// 是否新用户第一次進直播間
|
||||||
public boolean isisNewUserOne(){
|
public boolean isisNewUserOne(){
|
||||||
return getBoolean("isNewUserOne",false);
|
return getBoolean(isNewUserOne,false);
|
||||||
}
|
}
|
||||||
//新用戶是否送了禮物
|
//新用戶是否送了禮物
|
||||||
public void setisNewUserOne(boolean t){
|
public void setisNewUserOne(boolean t){
|
||||||
put("isNewUserOne",t);
|
put(isNewUserOne,t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -127,6 +129,8 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
|
|
||||||
//删除用户登录信息
|
//删除用户登录信息
|
||||||
deleteByKey(KEY_USER_INFO);
|
deleteByKey(KEY_USER_INFO);
|
||||||
|
deleteByKey(isNewUserGif);
|
||||||
|
deleteByKey(isNewUserOne);
|
||||||
//用户对象置空
|
//用户对象置空
|
||||||
userInfo = null;
|
userInfo = null;
|
||||||
manager = null;
|
manager = null;
|
||||||
|
@ -191,6 +191,8 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
protected void main() {
|
||||||
|
|
||||||
|
|
||||||
liveImDeletUtil = new LiveImDeletUtil();
|
liveImDeletUtil = new LiveImDeletUtil();
|
||||||
if (getIntent().getIntExtra("isry", 0) == 1) {
|
if (getIntent().getIntExtra("isry", 0) == 1) {
|
||||||
isRy = true;
|
isRy = true;
|
||||||
@ -479,6 +481,8 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
mChatLevel = obj.getIntValue("speak_limit");
|
mChatLevel = obj.getIntValue("speak_limit");
|
||||||
mDanMuLevel = obj.getIntValue("barrage_limit");
|
mDanMuLevel = obj.getIntValue("barrage_limit");
|
||||||
|
|
||||||
|
EventBus.getDefault().post("close_login");
|
||||||
|
EventBus.getDefault().post("oneUesrOver");
|
||||||
|
|
||||||
//进入直播间
|
//进入直播间
|
||||||
AdjustEvent adjustEvent1 = new AdjustEvent("hiepcu");
|
AdjustEvent adjustEvent1 = new AdjustEvent("hiepcu");
|
||||||
|
@ -508,12 +508,12 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
int i = v.getId();
|
int i = v.getId();
|
||||||
if (i == R.id.btn_send || i == R.id.btn_send_lian) {
|
if (i == R.id.btn_send || i == R.id.btn_send_lian) {
|
||||||
if (ToolsButton.isFastDoubleClick() && mLiveGiftBean.getSwf().contains("svga")) {
|
if(ToolsButton.isFastDoubleClick() && mLiveGiftBean.getTag()!=null&&mCount.equals("1")){
|
||||||
// Log.e("tag","停");
|
ToastUtil.show("手速太快了");
|
||||||
|
} else if (ToolsButton.isFastDoubleClick() && mLiveGiftBean.getSwf().contains("svga")) {
|
||||||
ToastUtil.show("手速太快了");
|
ToastUtil.show("手速太快了");
|
||||||
} else {
|
} else {
|
||||||
// Log.e("tag","送");
|
sendGift();
|
||||||
sendGift();
|
|
||||||
}
|
}
|
||||||
} else if (i == R.id.btn_choose) {
|
} else if (i == R.id.btn_choose) {
|
||||||
showGiftCount();
|
showGiftCount();
|
||||||
|
@ -620,7 +620,16 @@ public class LiveHttpUtil {
|
|||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 獲取新手任務
|
||||||
|
* @param callback
|
||||||
|
*/
|
||||||
|
public static void getFrontTask(String Token,String uid,HttpCallback callback) {
|
||||||
|
HttpClient.getInstance().get("User.getFrontTask", "User.getFrontTask")
|
||||||
|
.params("token", Token)
|
||||||
|
.params("uid", uid)
|
||||||
|
.execute(callback);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 完成新手任務
|
* 完成新手任務
|
||||||
|
@ -294,7 +294,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
|||||||
mBannerList1.add(bannerBean);
|
mBannerList1.add(bannerBean);
|
||||||
|
|
||||||
|
|
||||||
LiveHttpUtil.getFrontTask(new HttpCallback() {
|
LiveHttpUtil.getFrontTask(IMLoginManager.get(mContext).getUserInfo().getToken(),""+IMLoginManager.get(mContext).getUserInfo().getId(),new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
JSONObject old_obj = JSON.parseObject(info[0]);
|
JSONObject old_obj = JSON.parseObject(info[0]);
|
||||||
|
@ -85,8 +85,13 @@ import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
|||||||
import com.yunbao.live.socket.SocketRyClient;
|
import com.yunbao.live.socket.SocketRyClient;
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
import com.yunbao.main.dialog.LoginTipsDialog;
|
import com.yunbao.main.dialog.LoginTipsDialog;
|
||||||
|
import com.yunbao.main.event.RegSuccessEvent;
|
||||||
import com.yunbao.main.http.MainHttpUtil;
|
import com.yunbao.main.http.MainHttpUtil;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -97,28 +102,6 @@ import io.rong.message.TextMessage;
|
|||||||
import static com.yunbao.common.CommonAppContext.logger;
|
import static com.yunbao.common.CommonAppContext.logger;
|
||||||
import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
|
import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
|
||||||
|
|
||||||
//import com.facebook.AccessToken;
|
|
||||||
//import com.facebook.CallbackManager;
|
|
||||||
//import com.facebook.FacebookCallback;
|
|
||||||
//import com.facebook.FacebookException;
|
|
||||||
//import com.facebook.FacebookSdk;
|
|
||||||
//import com.facebook.Profile;
|
|
||||||
//import com.facebook.login.LoginManager;
|
|
||||||
//import com.facebook.login.LoginResult;
|
|
||||||
|
|
||||||
//import com.linecorp.linesdk.LoginDelegate;
|
|
||||||
//import com.linecorp.linesdk.LoginListener;
|
|
||||||
//import com.linecorp.linesdk.Scope;
|
|
||||||
//import com.linecorp.linesdk.auth.LineAuthenticationParams;
|
|
||||||
//import com.linecorp.linesdk.auth.LineLoginApi;
|
|
||||||
//import com.linecorp.linesdk.auth.LineLoginResult;
|
|
||||||
//import com.linecorp.linesdk.widget.LoginButton;
|
|
||||||
//import com.google.android.gms.auth.api.signin.GoogleSignIn;
|
|
||||||
//import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
|
|
||||||
//import com.google.android.gms.auth.api.signin.GoogleSignInClient;
|
|
||||||
//import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
|
|
||||||
//import com.google.android.gms.common.api.ApiException;
|
|
||||||
//import com.google.android.gms.tasks.Task;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入口
|
* 入口
|
||||||
@ -141,6 +124,13 @@ public class EntryActivity extends AppCompatActivity {
|
|||||||
private LinearLayout lt_btn_twitter, lt_btn_facebook, lt_customer;
|
private LinearLayout lt_btn_twitter, lt_btn_facebook, lt_customer;
|
||||||
private String kefuUrl = "";
|
private String kefuUrl = "";
|
||||||
|
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
public void close(String str) {
|
||||||
|
if ("close_login".equals(str)) {
|
||||||
|
this.finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置透明状态栏
|
* 设置透明状态栏
|
||||||
*/
|
*/
|
||||||
@ -180,6 +170,7 @@ public class EntryActivity extends AppCompatActivity {
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_entry);
|
setContentView(R.layout.activity_entry);
|
||||||
|
|
||||||
Get_hash_key();
|
Get_hash_key();
|
||||||
activity = this;
|
activity = this;
|
||||||
Contexts = this;
|
Contexts = this;
|
||||||
@ -229,6 +220,8 @@ public class EntryActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
EventBus.getDefault().register(this);
|
||||||
|
|
||||||
getPromoCode();
|
getPromoCode();
|
||||||
getUuidDevice();
|
getUuidDevice();
|
||||||
AdjustEvent adjustEvent2 = new AdjustEvent("tyqsyf");
|
AdjustEvent adjustEvent2 = new AdjustEvent("tyqsyf");
|
||||||
@ -298,7 +291,6 @@ public class EntryActivity extends AppCompatActivity {
|
|||||||
ToastUtil.show(getResources().getString(R.string.user_login_outtime));
|
ToastUtil.show(getResources().getString(R.string.user_login_outtime));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// requestPermission();
|
|
||||||
|
|
||||||
googleLoginSet();
|
googleLoginSet();
|
||||||
twitterLoginSet();
|
twitterLoginSet();
|
||||||
@ -466,6 +458,8 @@ public class EntryActivity extends AppCompatActivity {
|
|||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
@Override
|
@Override
|
||||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
Log.i("ttts1", requestCode + "a " + resultCode);
|
||||||
|
|
||||||
if (requestCode == 1001) {//line登录
|
if (requestCode == 1001) {//line登录
|
||||||
LineLoginResult result = LineLoginApi.getLoginResultFromIntent(data);
|
LineLoginResult result = LineLoginApi.getLoginResultFromIntent(data);
|
||||||
Log.i("ttts", result.getResponseCode() + "");
|
Log.i("ttts", result.getResponseCode() + "");
|
||||||
@ -532,13 +526,14 @@ public class EntryActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
|
||||||
private void updateUI() {
|
private void updateUI() {
|
||||||
boolean enableButtons = AccessToken.getCurrentAccessToken() != null;
|
boolean enableButtons = AccessToken.getCurrentAccessToken() != null;
|
||||||
|
ToastUtil.show(enableButtons+"");
|
||||||
Profile profile = Profile.getCurrentProfile();
|
Profile profile = Profile.getCurrentProfile();
|
||||||
if (enableButtons && profile != null) {
|
if (enableButtons && profile != null) {
|
||||||
|
ToastUtil.show(profile.getId()+"");
|
||||||
LoginData data = new LoginData();
|
LoginData data = new LoginData();
|
||||||
data.setAvatar(profile.getProfilePictureUri(150, 150).toString());
|
// data.setAvatar(profile.getProfilePictureUri(150, 150).toString());
|
||||||
data.setNickName(profile.getName());
|
data.setNickName(profile.getName());
|
||||||
data.setOpenID(AccessToken.getCurrentAccessToken().getUserId());
|
data.setOpenID(AccessToken.getCurrentAccessToken().getUserId());
|
||||||
data.setType("facebook");
|
data.setType("facebook");
|
||||||
@ -644,12 +639,13 @@ public class EntryActivity extends AppCompatActivity {
|
|||||||
mFirstLogin = obj.getIntValue("first_login") == 1;
|
mFirstLogin = obj.getIntValue("first_login") == 1;
|
||||||
mShowInvite = obj.getIntValue("isagent") == 1;
|
mShowInvite = obj.getIntValue("isagent") == 1;
|
||||||
CommonAppConfig.getInstance().setLoginInfo(uid, token, true);
|
CommonAppConfig.getInstance().setLoginInfo(uid, token, true);
|
||||||
getBaseUserInfo();
|
|
||||||
//设置登录信息
|
//设置登录信息
|
||||||
IMLoginModel model = GsonUtils.fromJson(info[0], IMLoginModel.class);
|
IMLoginModel model = GsonUtils.fromJson(info[0], IMLoginModel.class);
|
||||||
IMLoginManager.get(activity).setupLoginUser(model);
|
IMLoginManager.get(activity).setupLoginUser(model);
|
||||||
//融云连接服务器
|
//融云连接服务器
|
||||||
RongcloudIMManager.connectIM(activity);
|
RongcloudIMManager.connectIM(activity);
|
||||||
|
getBaseUserInfo();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Contexts.startActivity(new Intent(Contexts, BindUserActivity.class).putExtra("uid", uid).putExtra("token", token));
|
Contexts.startActivity(new Intent(Contexts, BindUserActivity.class).putExtra("uid", uid).putExtra("token", token));
|
||||||
}
|
}
|
||||||
@ -669,7 +665,7 @@ public class EntryActivity extends AppCompatActivity {
|
|||||||
if (mFirstLogin) {
|
if (mFirstLogin) {
|
||||||
//绑定广告渠道用户
|
//绑定广告渠道用户
|
||||||
AdjustEvent adjustEvent = new AdjustEvent("s1or0t");
|
AdjustEvent adjustEvent = new AdjustEvent("s1or0t");
|
||||||
adjustEvent.addCallbackParameter("userid", "bar");
|
adjustEvent.addCallbackParameter("userid", CommonAppConfig.getInstance().getUid());
|
||||||
Adjust.trackEvent(adjustEvent);
|
Adjust.trackEvent(adjustEvent);
|
||||||
|
|
||||||
//完成第三方登录
|
//完成第三方登录
|
||||||
|
@ -83,15 +83,22 @@ public class LoginActivity extends AbsActivity {
|
|||||||
static String phoneNum;
|
static String phoneNum;
|
||||||
static String pwd;
|
static String pwd;
|
||||||
private static Context Contexts;
|
private static Context Contexts;
|
||||||
static Activity activity;
|
Activity activity;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
return R.layout.activity_login;
|
return R.layout.activity_login;
|
||||||
}
|
}
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
public void onRegSuccessEvent(RegSuccessEvent e) {
|
||||||
|
if (!isFinishing()){
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
protected void main() {
|
||||||
|
EventBus.getDefault().register(this);
|
||||||
mRoot = findViewById(R.id.root);
|
mRoot = findViewById(R.id.root);
|
||||||
Contexts = this;
|
Contexts = this;
|
||||||
activity = this;
|
activity = this;
|
||||||
@ -148,7 +155,6 @@ public class LoginActivity extends AbsActivity {
|
|||||||
if (!otherLoginType) {
|
if (!otherLoginType) {
|
||||||
findViewById(R.id.other_login_tip).setVisibility(View.INVISIBLE);
|
findViewById(R.id.other_login_tip).setVisibility(View.INVISIBLE);
|
||||||
}
|
}
|
||||||
EventBus.getDefault().register(this);
|
|
||||||
|
|
||||||
getUuidDevice();
|
getUuidDevice();
|
||||||
getPromoCode();
|
getPromoCode();
|
||||||
@ -276,16 +282,13 @@ public class LoginActivity extends AbsActivity {
|
|||||||
mFirstLogin = obj.getIntValue("first_login") == 1;
|
mFirstLogin = obj.getIntValue("first_login") == 1;
|
||||||
mShowInvite = obj.getIntValue("isagent") == 1;
|
mShowInvite = obj.getIntValue("isagent") == 1;
|
||||||
CommonAppConfig.getInstance().setLoginInfo(uid, token, true);
|
CommonAppConfig.getInstance().setLoginInfo(uid, token, true);
|
||||||
getBaseUserInfo();
|
|
||||||
mFirebaseAnalytics.logEvent("FS_createdRole", null);
|
|
||||||
logger.logEvent("FB_createdRole");
|
|
||||||
//设置登录信息
|
//设置登录信息
|
||||||
IMLoginModel model = GsonUtils.fromJson(info[0], IMLoginModel.class);
|
IMLoginModel model = GsonUtils.fromJson(info[0], IMLoginModel.class);
|
||||||
IMLoginManager.get(activity).setupLoginUser(model);
|
IMLoginManager.get(activity).setupLoginUser(model);
|
||||||
//融云连接服务器
|
|
||||||
RongcloudIMManager.connectIM(activity);
|
getBaseUserInfo();
|
||||||
//友盟统计登录
|
mFirebaseAnalytics.logEvent("FS_createdRole", null);
|
||||||
// MobclickAgent.onProfileSignIn(mLoginType, uid);
|
logger.logEvent("FB_createdRole");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ToastUtil.show(msg);
|
ToastUtil.show(msg);
|
||||||
@ -299,12 +302,13 @@ public class LoginActivity extends AbsActivity {
|
|||||||
MainHttpUtil.getBaseInfo(new CommonCallback<UserBean>() {
|
MainHttpUtil.getBaseInfo(new CommonCallback<UserBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void callback(UserBean bean) {
|
public void callback(UserBean bean) {
|
||||||
|
//融云连接服务器
|
||||||
|
RongcloudIMManager.connectIM(activity);
|
||||||
//完成手机号密码登录
|
//完成手机号密码登录
|
||||||
AdjustEvent adjustEvent1 = new AdjustEvent("4ncwlv");
|
AdjustEvent adjustEvent1 = new AdjustEvent("4ncwlv");
|
||||||
mFirebaseAnalytics.logEvent("FS_login", null);
|
mFirebaseAnalytics.logEvent("FS_login", null);
|
||||||
logger.logEvent("FB_login");
|
logger.logEvent("FB_login");
|
||||||
Adjust.trackEvent(adjustEvent1);
|
Adjust.trackEvent(adjustEvent1);
|
||||||
ToastUtil.show(mFirstLogin+"");
|
|
||||||
HttpClient.getInstance().post("Home.getRandJoinAnchor", "Home.getRandJoinAnchor")
|
HttpClient.getInstance().post("Home.getRandJoinAnchor", "Home.getRandJoinAnchor")
|
||||||
.params("uid", CommonAppConfig.getInstance().getUid())
|
.params("uid", CommonAppConfig.getInstance().getUid())
|
||||||
.params("token", CommonAppConfig.getInstance().getToken())
|
.params("token", CommonAppConfig.getInstance().getToken())
|
||||||
@ -316,13 +320,10 @@ public class LoginActivity extends AbsActivity {
|
|||||||
MainActivity.forward(LoginActivity.this, false);
|
MainActivity.forward(LoginActivity.this, false);
|
||||||
gotoLive(obj.getString("anchor_id"));
|
gotoLive(obj.getString("anchor_id"));
|
||||||
IMLoginManager.get(mContext).setisNewUserOne(true);
|
IMLoginManager.get(mContext).setisNewUserOne(true);
|
||||||
EntryActivity.activity.finish();
|
|
||||||
activity.finish();
|
|
||||||
} else {
|
} else {
|
||||||
MainActivity.forward(LoginActivity.this, false);
|
MainActivity.forward(LoginActivity.this, false);
|
||||||
EntryActivity.activity.finish();
|
|
||||||
activity.finish();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -330,6 +331,13 @@ public class LoginActivity extends AbsActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
public void close(String str) {
|
||||||
|
if ("close_login".equals(str)) {
|
||||||
|
this.finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 三方登录
|
* 三方登录
|
||||||
*/
|
*/
|
||||||
@ -363,10 +371,7 @@ public class LoginActivity extends AbsActivity {
|
|||||||
mUuidDevice = DeviceUtils.getUniqueDeviceId();
|
mUuidDevice = DeviceUtils.getUniqueDeviceId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
public void onRegSuccessEvent(RegSuccessEvent e) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
@ -379,9 +384,7 @@ public class LoginActivity extends AbsActivity {
|
|||||||
CommonHttpUtil.cancel(CommonHttpConsts.GET_QQ_LOGIN_UNION_ID);
|
CommonHttpUtil.cancel(CommonHttpConsts.GET_QQ_LOGIN_UNION_ID);
|
||||||
MainHttpUtil.cancel(MainHttpConsts.LOGIN_BY_THIRD);
|
MainHttpUtil.cancel(MainHttpConsts.LOGIN_BY_THIRD);
|
||||||
MainHttpUtil.cancel(MainHttpConsts.GET_BASE_INFO);
|
MainHttpUtil.cancel(MainHttpConsts.GET_BASE_INFO);
|
||||||
// if (mLoginUtil != null) {
|
|
||||||
// mLoginUtil.release();
|
|
||||||
// }
|
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -243,7 +243,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
protected void main() {
|
||||||
|
|
||||||
ConversationIMListManager.get(this);
|
ConversationIMListManager.get(this);
|
||||||
//谷歌支付
|
//谷歌支付
|
||||||
GoogleBillingUtil.setIsAutoAcknowledgePurchase(true);//设置自动确认购买
|
GoogleBillingUtil.setIsAutoAcknowledgePurchase(true);//设置自动确认购买
|
||||||
@ -354,7 +353,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
mFristLoad = true;
|
mFristLoad = true;
|
||||||
ConfigBean configBean = CommonAppConfig.getInstance().getConfig();
|
ConfigBean configBean = CommonAppConfig.getInstance().getConfig();
|
||||||
mUrlCsd = configBean.getCustomerServerUrl();
|
mUrlCsd = configBean.getCustomerServerUrl();
|
||||||
getD();
|
|
||||||
init();
|
init();
|
||||||
initTXIM();
|
initTXIM();
|
||||||
mViewPager.setCurrentItem(0);
|
mViewPager.setCurrentItem(0);
|
||||||
@ -744,7 +742,10 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
//显示顶部商城tab时,显示底部tabGroup
|
//显示顶部商城tab时,显示底部tabGroup
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onViewPagerScroll(String str) {
|
public void onViewPagerScroll(String str) {
|
||||||
if ("DownAnimaiton".equals(str)) {
|
if ("oneUesrOver".equals(str)) {
|
||||||
|
if(IMLoginManager.get(mContext).isisNewUserOne()==false) {
|
||||||
|
getD();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,11 +276,11 @@ public class RegisterActivity extends AbsActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void changeEnable() {
|
private void changeEnable() {
|
||||||
String phone = mEditPhone.getText().toString();
|
// String phone = mEditPhone.getText().toString();
|
||||||
String code = mEditCode.getText().toString();
|
// String code = mEditCode.getText().toString();
|
||||||
String pwd1 = mEditPwd1.getText().toString();
|
// String pwd1 = mEditPwd1.getText().toString();
|
||||||
String pwd2 = mEditPwd2.getText().toString();
|
// String pwd2 = mEditPwd2.getText().toString();
|
||||||
mBtnRegister.setEnabled(!TextUtils.isEmpty(phone) && !TextUtils.isEmpty(code) && !TextUtils.isEmpty(pwd1) && !TextUtils.isEmpty(pwd2));
|
// mBtnRegister.setEnabled(!TextUtils.isEmpty(phone) && !TextUtils.isEmpty(code) && !TextUtils.isEmpty(pwd1) && !TextUtils.isEmpty(pwd2));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showCountryCode() {
|
private void showCountryCode() {
|
||||||
@ -307,6 +307,7 @@ public class RegisterActivity extends AbsActivity {
|
|||||||
mFirebaseAnalytics.logEvent("FS_phone_getcode", null);
|
mFirebaseAnalytics.logEvent("FS_phone_getcode", null);
|
||||||
logger.logEvent("FB_phone_getcode");
|
logger.logEvent("FB_phone_getcode");
|
||||||
} else if (i == R.id.btn_register) {
|
} else if (i == R.id.btn_register) {
|
||||||
|
register();
|
||||||
|
|
||||||
AdjustEvent adjustEvent1 = new AdjustEvent("wrajax");
|
AdjustEvent adjustEvent1 = new AdjustEvent("wrajax");
|
||||||
Adjust.trackEvent(adjustEvent1);
|
Adjust.trackEvent(adjustEvent1);
|
||||||
@ -314,7 +315,6 @@ public class RegisterActivity extends AbsActivity {
|
|||||||
|
|
||||||
mFirebaseAnalytics.logEvent("FS_phone_clickregister", null);
|
mFirebaseAnalytics.logEvent("FS_phone_clickregister", null);
|
||||||
logger.logEvent("FB_phone_clickregister");
|
logger.logEvent("FB_phone_clickregister");
|
||||||
register();
|
|
||||||
} else if (i == R.id.btn_tip2) {
|
} else if (i == R.id.btn_tip2) {
|
||||||
WebViewActivity.forward(mContext, HtmlConfig.REG_PRIVCAY1);
|
WebViewActivity.forward(mContext, HtmlConfig.REG_PRIVCAY1);
|
||||||
} else if (i == R.id.btn_tip3) {
|
} else if (i == R.id.btn_tip3) {
|
||||||
@ -485,16 +485,16 @@ public class RegisterActivity extends AbsActivity {
|
|||||||
JSONObject obj = JSON.parseObject(info[0]);
|
JSONObject obj = JSON.parseObject(info[0]);
|
||||||
String uid = obj.getString("id");
|
String uid = obj.getString("id");
|
||||||
String token = obj.getString("token");
|
String token = obj.getString("token");
|
||||||
mFirstLogin = obj.getIntValue("isreg") == 1;
|
mFirstLogin = obj.getIntValue("first_login") == 1;
|
||||||
mShowInvite = obj.getIntValue("isagent") == 1;
|
mShowInvite = obj.getIntValue("isagent") == 1;
|
||||||
CommonAppConfig.getInstance().setLoginInfo(uid, token, true);
|
CommonAppConfig.getInstance().setLoginInfo(uid, token, true);
|
||||||
|
|
||||||
getBaseUserInfo();
|
|
||||||
//设置登录信息
|
//设置登录信息
|
||||||
IMLoginModel model = GsonUtils.fromJson(info[0], IMLoginModel.class);
|
IMLoginModel model = GsonUtils.fromJson(info[0], IMLoginModel.class);
|
||||||
IMLoginManager.get(activity).setupLoginUser(model);
|
IMLoginManager.get(activity).setupLoginUser(model);
|
||||||
//融云连接服务器
|
//融云连接服务器
|
||||||
RongcloudIMManager.connectIM(activity);
|
RongcloudIMManager.connectIM(activity);
|
||||||
|
getBaseUserInfo();
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ToastUtil.show(msg);
|
ToastUtil.show(msg);
|
||||||
@ -522,6 +522,10 @@ public class RegisterActivity extends AbsActivity {
|
|||||||
}
|
}
|
||||||
if (bean != null) {
|
if (bean != null) {
|
||||||
if (mFirstLogin) {
|
if (mFirstLogin) {
|
||||||
|
//绑定广告渠道用户
|
||||||
|
AdjustEvent adjustEvent = new AdjustEvent("s1or0t");
|
||||||
|
adjustEvent.addCallbackParameter("userid", CommonAppConfig.getInstance().getUid());
|
||||||
|
Adjust.trackEvent(adjustEvent);
|
||||||
HttpClient.getInstance().post("Home.getRandJoinAnchor", "Home.getRandJoinAnchor")
|
HttpClient.getInstance().post("Home.getRandJoinAnchor", "Home.getRandJoinAnchor")
|
||||||
.params("uid", CommonAppConfig.getInstance().getUid())
|
.params("uid", CommonAppConfig.getInstance().getUid())
|
||||||
.params("token", CommonAppConfig.getInstance().getToken())
|
.params("token", CommonAppConfig.getInstance().getToken())
|
||||||
|
@ -244,10 +244,12 @@
|
|||||||
android:layout_marginRight="30dp"
|
android:layout_marginRight="30dp"
|
||||||
android:background="@drawable/border_fdbe40"
|
android:background="@drawable/border_fdbe40"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:clickable="true"
|
||||||
android:onClick="registerClick"
|
android:onClick="registerClick"
|
||||||
android:text="註冊並登錄"
|
android:text="註冊並登錄"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp"
|
||||||
|
android:focusable="true" />
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
Loading…
Reference in New Issue
Block a user