直播间开通贵族
This commit is contained in:
parent
bf9d573727
commit
1c16a673fd
@ -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;
|
||||
@ -66,33 +67,46 @@ import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.FaceBookUpModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LoginData;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.http.main.MainNetManager;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.NoviceInstructorManager;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.NobleNoticeView;
|
||||
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.event.RegSuccessEvent;
|
||||
import com.yunbao.main.http.MainHttpUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
import org.json.JSONException;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import io.rong.imlib.RongIMClient;
|
||||
import io.rong.message.TextMessage;
|
||||
|
||||
import static com.blankj.utilcode.util.SnackbarUtils.dismiss;
|
||||
import static com.yunbao.common.CommonAppContext.home_zdy_img_cn;
|
||||
import static com.yunbao.common.CommonAppContext.home_zdy_img_us;
|
||||
import static com.yunbao.common.CommonAppContext.logger;
|
||||
@ -119,7 +133,6 @@ public class EntryActivity extends AppCompatActivity {
|
||||
private GoogleSignInClient mGoogleSignInClient;
|
||||
private LinearLayout lt_btn_twitter, lt_btn_facebook, lt_customer;
|
||||
private String kefuUrl = "";
|
||||
private NobleNoticeView noble;
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void close(String str) {
|
||||
@ -187,7 +200,6 @@ public class EntryActivity extends AppCompatActivity {
|
||||
btn_phone = findViewById(R.id.btn_phone);
|
||||
btn_line = findViewById(R.id.btn_line);
|
||||
lt_customer = findViewById(R.id.lt_customer);
|
||||
noble = findViewById(R.id.noble);
|
||||
|
||||
btn_tip.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);
|
||||
btn_tip.getPaint().setAntiAlias(true);
|
||||
@ -214,9 +226,8 @@ public class EntryActivity extends AppCompatActivity {
|
||||
btn_phone.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
// LoginTipsDialog loginTipsDialog = new LoginTipsDialog();
|
||||
// loginTipsDialog.show(getSupportFragmentManager(), "LoginTipsDialog");
|
||||
noble.setRoleType(NobleNoticeView.RoleType.BETTER_EMPEROR);
|
||||
LoginTipsDialog loginTipsDialog = new LoginTipsDialog();
|
||||
loginTipsDialog.show(getSupportFragmentManager(), "LoginTipsDialog");
|
||||
}
|
||||
});
|
||||
|
||||
@ -271,6 +282,24 @@ public class EntryActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
});
|
||||
MainNetManager.get(EntryActivity.this)
|
||||
.FaceBookUp(new com.yunbao.common.http.base.HttpCallback<FaceBookUpModel>() {
|
||||
@Override
|
||||
public void onSuccess(FaceBookUpModel data) {
|
||||
if(data.getType().equals("0")){
|
||||
LoginManager.getInstance().logInWithReadPermissions(EntryActivity.this, Arrays.asList("public_profile"));
|
||||
}else{
|
||||
WebViewActivity.forward(EntryActivity.this, data.getLink()+"?");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
LoginManager.getInstance().logInWithReadPermissions(EntryActivity.this, Arrays.asList("public_profile"));
|
||||
// MainNetManager.get(EntryActivity.this)
|
||||
// .FaceBookUp(new com.yunbao.common.http.base.HttpCallback<FaceBookUpModel>() {
|
||||
@ -752,7 +781,7 @@ public class EntryActivity extends AppCompatActivity {
|
||||
IMLoginManager.get(EntryActivity.this).setisNewUserOne(true);
|
||||
MainActivity.forward(EntryActivity.this, false);
|
||||
gotoLive(obj.getString("anchor_id"));
|
||||
if (obj.containsKey("home_zdy_img_us")) {
|
||||
if(obj.containsKey("home_zdy_img_us")) {
|
||||
home_zdy_img_us = obj.getString("home_zdy_img_us");
|
||||
home_zdy_img_cn = obj.getString("home_zdy_img_cn");
|
||||
}
|
||||
@ -804,3 +833,4 @@ public class EntryActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user