diff --git a/common/src/main/java/com/yunbao/common/CommonAppContext.java b/common/src/main/java/com/yunbao/common/CommonAppContext.java index bb44c594c..33d802f28 100644 --- a/common/src/main/java/com/yunbao/common/CommonAppContext.java +++ b/common/src/main/java/com/yunbao/common/CommonAppContext.java @@ -37,6 +37,8 @@ public class CommonAppContext extends MultiDexApplication { public static FirebaseAnalytics mFirebaseAnalytics; public static AppEventsLogger logger; public static boolean isReady = false; + public static String home_zdy_img_us = ""; + public static String home_zdy_img_cn = ""; @Override public void onCreate() { diff --git a/common/src/main/java/com/yunbao/common/bean/FaceBookUpModel.java b/common/src/main/java/com/yunbao/common/bean/FaceBookUpModel.java new file mode 100644 index 000000000..ba101b62f --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/FaceBookUpModel.java @@ -0,0 +1,21 @@ +package com.yunbao.common.bean; + +public class FaceBookUpModel extends BaseModel { + String type,link; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getLink() { + return link; + } + + public void setLink(String link) { + this.link = link; + } +} diff --git a/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java b/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java index c52a69de4..2e3725616 100644 --- a/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java @@ -5,6 +5,7 @@ import android.view.Gravity; import android.view.View; import android.view.Window; import android.view.WindowManager; +import android.widget.ImageView; import androidx.annotation.Nullable; import androidx.fragment.app.DialogFragment; @@ -13,18 +14,28 @@ import androidx.fragment.app.FragmentTransaction; import com.adjust.sdk.Adjust; import com.adjust.sdk.AdjustEvent; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import com.facebook.appevents.AppEventsLogger; import com.google.firebase.analytics.FirebaseAnalytics; +import com.yunbao.common.CommonAppConfig; import com.yunbao.common.R; import com.yunbao.common.event.InstructorOperationEvent; +import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.http.HttpClient; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.NoviceInstructorManager; import org.greenrobot.eventbus.EventBus; import java.lang.reflect.Field; +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.lang; + public class InstructorOperationDialog extends AbsDialogFragment { @Override @@ -84,8 +95,15 @@ public class InstructorOperationDialog extends AbsDialogFragment { @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); + ImageView to_msg = mRootView.findViewById(R.id.to_msg); + if(lang.equals("english")){ + ImgLoader.display(mContext,home_zdy_img_us, to_msg); + }else{ + ImgLoader.display(mContext,home_zdy_img_cn, to_msg); + } + NoviceInstructorManager.get(getActivity()).setHomeZdyPop(""); - mRootView.findViewById(R.id.hurry_contact).setOnClickListener(new View.OnClickListener() { + mRootView.findViewById(R.id.to_msg).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { AdjustEvent adjustEvent1 = new AdjustEvent("82nzkz"); diff --git a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java index f7cff9fae..79ab59cfd 100644 --- a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java +++ b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java @@ -2,12 +2,16 @@ package com.yunbao.common.http; import com.yunbao.common.bean.AnchorRecommendModel; import com.yunbao.common.bean.BaseModel; +import com.yunbao.common.bean.FaceBookUpModel; import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.LiveInfoModel; import com.yunbao.common.bean.NobleTrumpetModel; import com.yunbao.common.bean.SearchModel; import com.yunbao.common.bean.SetAttentsModel; +import org.json.JSONObject; + +import java.util.HashMap; import java.util.List; import io.reactivex.Observable; @@ -61,6 +65,12 @@ public interface PDLiveApi { @Query("trumpet_msg") String trumpetMsg, @Query("anchor_id") String anchorid); + /** + * FB是否替换新key + */ + @GET("/api/public/?service=Login.getFaceBookUpType") + Observable> faceBookUp(); + /** * 搜索 * diff --git a/common/src/main/java/com/yunbao/common/http/main/MainNetManager.java b/common/src/main/java/com/yunbao/common/http/main/MainNetManager.java index 3a19ceadc..c1be0e2bb 100644 --- a/common/src/main/java/com/yunbao/common/http/main/MainNetManager.java +++ b/common/src/main/java/com/yunbao/common/http/main/MainNetManager.java @@ -2,6 +2,7 @@ package com.yunbao.common.http.main; import android.app.Activity; +import com.yunbao.common.bean.FaceBookUpModel; import com.yunbao.common.bean.AnchorRecommendModel; import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.SearchModel; @@ -9,6 +10,8 @@ import com.yunbao.common.http.API; import com.yunbao.common.http.ResponseModel; import com.yunbao.common.http.base.HttpCallback; +import org.json.JSONObject; + import java.util.List; import io.reactivex.android.schedulers.AndroidSchedulers; @@ -66,21 +69,19 @@ public class MainNetManager { } /** - * 搜索 - * - * @param jianKey 簡體關鍵字 - * @param fanKey 繁體關鍵字 - * @param type 搜索類型 1,全部 2,主播 3,用戶 - * @param p 頁碼 + * FB是否替换新Key + * @param callback */ - public void search(String jianKey, String fanKey, int type, int p, HttpCallback>> callback) { - API.get().pdLiveApi(mContext).search(jianKey, fanKey, type, p) + public void FaceBookUp(HttpCallback callback) { + API.get().pdLiveApi(mContext).faceBookUp() .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(listResponseModel -> { - if (callback != null) { - List> model = listResponseModel.getData().getInfo(); - callback.onSuccess(model); + .subscribe(new Consumer>() { + @Override + public void accept(ResponseModel obj) throws Exception { + if (callback != null) { + callback.onSuccess(obj.getData().getInfo()); + } } }, throwable -> { if (callback != null) { @@ -88,31 +89,6 @@ public class MainNetManager { } }).isDisposed(); } - - /** - * 搜索 - * - * @param jianKey 簡體關鍵字 - * @param fanKey 繁體關鍵字 - * @param type 搜索類型 1,全部 2,主播 3,用戶 - * @param p 頁碼 - */ - public void searchNew(String jianKey, String fanKey, int type, int p, HttpCallback> callback) { - API.get().pdLiveApi(mContext).searchNew(jianKey, fanKey, type, p) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(listResponseModel -> { - if (callback != null) { - List model = listResponseModel.getData().getInfo(); - callback.onSuccess(model); - } - }, throwable -> { - if (callback != null) { - callback.onError(throwable.getMessage()); - } - }).isDisposed(); - } - /** * 猜你喜欢 * diff --git a/common/src/main/res/layout/view_instructor_operation.xml b/common/src/main/res/layout/view_instructor_operation.xml index 1e9454b69..e1c957791 100644 --- a/common/src/main/res/layout/view_instructor_operation.xml +++ b/common/src/main/res/layout/view_instructor_operation.xml @@ -8,11 +8,12 @@ @@ -30,6 +33,7 @@ android:layout_marginTop="14dp" android:text="@string/welcome_pd_tip" android:textColor="#FFF19DA0" + android:visibility="gone" android:textSize="12sp" /> @@ -48,17 +52,20 @@ @@ -86,7 +93,7 @@ android:layout_height="35dp" android:layout_marginStart="30dp" android:layout_marginEnd="30dp" - android:layout_marginBottom="30dp" + android:layout_marginBottom="20dp" android:orientation="vertical" app:cardBackgroundColor="#FFFFBE41" app:cardCornerRadius="20dp" @@ -114,6 +121,16 @@ + + + android:layout_centerVertical="true" + android:layout_marginRight="30dp" + android:layout_marginLeft="30dp" + android:layout_marginTop="86dp" + android:gravity="center_horizontal"/> + \ No newline at end of file diff --git a/common/src/main/res/mipmap-xxhdpi/top_zhidao_bg.png b/common/src/main/res/mipmap-xxhdpi/top_zhidao_bg.png index 144121651..09935b434 100644 Binary files a/common/src/main/res/mipmap-xxhdpi/top_zhidao_bg.png and b/common/src/main/res/mipmap-xxhdpi/top_zhidao_bg.png differ diff --git a/common/src/main/res/values-en/strings.xml b/common/src/main/res/values-en/strings.xml index 1d216e368..3bbb38eb7 100644 --- a/common/src/main/res/values-en/strings.xml +++ b/common/src/main/res/values-en/strings.xml @@ -833,11 +833,12 @@ 前往「個人中心」-「我的包裹」中,即可使用熱度卡。 熱度卡生效多久? 對指定主播使用熱度卡後,將會立即生效,效果時長為24小時,不管主播是否在線,熱度時長都將會持續減少 - Welcome to PD LIVE - Here are all kinds of interesting anchor\n And a variety of activities to play + Rewards coming! + Receive free +Limited ride And limited avatar frame Looking for you like? - Contact your dedicated mentor to We can - match you with more styles of anchor! + Go contact your personal guide to + get your prize redemption code! Contact a mentor now! Withdrawal succeeded normal barrage diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 4ef99d87d..96b17a871 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -847,11 +847,11 @@ 熱度卡生效多久? 對指定主播使用熱度卡後,將會立即生效,效果時長為24小時,不管主播是否在線,熱度時長都將會持續減少 引用 - 歡迎來到PD LIVE - 這有各類好看有趣的主播\n還有各種豐富的活動玩法 + 你被大獎砸中啦! + 限定好禮 免費領取 \n限定座駕和限定頭像框 在找您喜歡的主播嗎? - 聯系您的專屬指導員 - 給您匹配更多風格的主播唷! + 恭喜你成為今日幸運新人 + 快去聯繫你的專屬指導員\n領取大獎兌換碼吧! 趕快聯系他/她吧! 撤回成功 普通彈幕 diff --git a/config.gradle b/config.gradle index 1cced9059..c00785796 100644 --- a/config.gradle +++ b/config.gradle @@ -4,8 +4,8 @@ ext { buildToolsVersion: "28.0.3", minSdkVersion : 21, targetSdkVersion : 30, - versionCode : 201, - versionName : "6.3.7" + versionCode : 202, + versionName : "6.3.8" ] manifestPlaceholders = [ //正式 @@ -24,6 +24,6 @@ ext { baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S", // true表示谷歌支付 false - isGooglePlay : true + isGooglePlay : false ] } \ No newline at end of file diff --git a/live/src/main/java/com/yunbao/live/activity/PDLiveConversationActivity.java b/live/src/main/java/com/yunbao/live/activity/PDLiveConversationActivity.java index a427faf35..6348f387b 100644 --- a/live/src/main/java/com/yunbao/live/activity/PDLiveConversationActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/PDLiveConversationActivity.java @@ -32,6 +32,7 @@ import com.yunbao.common.http.HttpCallback; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.NoviceInstructorManager; import com.yunbao.common.manager.imrongcloud.MessageIMManager; +import com.yunbao.common.utils.ToastUtil; import com.yunbao.live.R; import com.yunbao.live.bean.SearchUserBean; import com.yunbao.live.dialog.MenuPopuwWindow; @@ -113,14 +114,14 @@ public class PDLiveConversationActivity extends AbsActivity implements View.OnCl if (!TextUtils.isEmpty(userBean.getIs_admin()) && TextUtils.equals(userBean.getIs_admin(), "1")) { isAdmin = true; imgMore.setVisibility(View.GONE); - AdjustEvent adjustEvent1 = new AdjustEvent("ww5z2p"); + AdjustEvent adjustEvent1 = new AdjustEvent("exlgn3"); Adjust.trackEvent(adjustEvent1); - CommonHttpUtil.setAdvertisingChannels("ww5z2p", new HttpCallback() { + CommonHttpUtil.setAdvertisingChannels("exlgn3", new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { if (code == 0) { - FirebaseAnalytics.getInstance(mContext).logEvent("FS_customer_service", null); - AppEventsLogger.newLogger(mContext).logEvent("FB_customer_service"); + FirebaseAnalytics.getInstance(mContext).logEvent("FS_director_read", null); + AppEventsLogger.newLogger(mContext).logEvent("FB_director_read"); } } }); diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java index 43372c533..6861b079c 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveInputDialogFragment.java @@ -171,7 +171,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O //单选选中监听 radioHornType.setOnCheckedChangeListener(changeListener); radioHornType.getCheckedRadioButtonId(); - netHandler.post(getNobleTrumpetNumRunnable); +// netHandler.post(getNobleTrumpetNumRunnable); } @Override diff --git a/live/src/main/java/com/yunbao/live/dialog/NewUserDialog.java b/live/src/main/java/com/yunbao/live/dialog/NewUserDialog.java index e43561ade..41f11a2e5 100644 --- a/live/src/main/java/com/yunbao/live/dialog/NewUserDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/NewUserDialog.java @@ -121,8 +121,8 @@ public class NewUserDialog extends AbsDialogFragment { @Override public void onSuccess(int code, String msg, String[] info) { if (code == 0) { - FirebaseAnalytics.getInstance(getContext()).logEvent("FS_newbie_reward", null); - AppEventsLogger.newLogger(getContext()).logEvent("FB_newbie_reward"); + FirebaseAnalytics.getInstance(mContext).logEvent("FS_newbie_reward", null); + AppEventsLogger.newLogger(mContext).logEvent("FB_newbie_reward"); } } }); diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java index a1d229b98..7bcd4a0d2 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveLinkMicPresenter.java @@ -140,7 +140,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener { public void onUpdata(String str) { if ("showBanner".equals(str)) { showBanner3(); - } else if ("stop_svga_new_user_double".equals(str) && mBannerList3.size() > 3) { + } else if ("stop_svga_new_user_double".equals(str) && mBannerList3.size() > 2) { AdjustEvent adjustEvent1 = new AdjustEvent("80lzdi"); Adjust.trackEvent(adjustEvent1); CommonHttpUtil.setAdvertisingChannels("80lzdi", new HttpCallback() { @@ -161,7 +161,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener { } } } - } else if ("stop_svga_new_user_follow".equals(str)&& mBannerList3.size() > 2) { + } else if ("stop_svga_new_user_follow".equals(str)&& mBannerList3.size() > 1) { mBannerList3.get(1).setLink("1"); AdjustEvent adjustEvent1 = new AdjustEvent("f084wh"); Adjust.trackEvent(adjustEvent1); @@ -182,7 +182,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener { } } } - } else if ("stop_new_user_gif".equals(str)&& mBannerList3.size() > 1) { + } else if ("stop_new_user_gif".equals(str)&& mBannerList3.size() > 0) { AdjustEvent adjustEvent1 = new AdjustEvent("aqqz70"); Adjust.trackEvent(adjustEvent1); CommonHttpUtil.setAdvertisingChannels("aqqz70", new HttpCallback() { diff --git a/main/src/main/java/com/yunbao/main/activity/EntryActivity.java b/main/src/main/java/com/yunbao/main/activity/EntryActivity.java index 98edc6447..03103c858 100644 --- a/main/src/main/java/com/yunbao/main/activity/EntryActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EntryActivity.java @@ -67,12 +67,16 @@ 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; @@ -92,14 +96,19 @@ 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; import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; @@ -273,7 +282,24 @@ public class EntryActivity extends AppCompatActivity { } } }); - LoginManager.getInstance().logInWithReadPermissions(EntryActivity.this, Arrays.asList("public_profile")); + MainNetManager.get(EntryActivity.this) + .FaceBookUp(new com.yunbao.common.http.base.HttpCallback() { + @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) { + + + } + }); } }); @@ -736,6 +762,10 @@ 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")) { + home_zdy_img_us = obj.getString("home_zdy_img_us"); + home_zdy_img_cn = obj.getString("home_zdy_img_cn"); + } if (obj.containsKey("home_zdy_pop")) { NoviceInstructorManager.get(activity).setHomeZdyPop(obj.getString("home_zdy_pop")); } diff --git a/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java b/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java index 3431332c2..df4c169d9 100644 --- a/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java +++ b/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java @@ -24,6 +24,9 @@ import com.adjust.sdk.AdjustEvent; import com.android.billingclient.api.Purchase; import com.android.billingclient.api.SkuDetails; import com.facebook.appevents.AppEventsConstants; +import com.google.android.gms.ads.identifier.AdvertisingIdClient; +import com.google.android.gms.common.GooglePlayServicesNotAvailableException; +import com.google.android.gms.common.GooglePlayServicesRepairableException; import com.google.firebase.analytics.FirebaseAnalytics; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.http.CommonHttpUtil; @@ -45,6 +48,7 @@ import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTit import net.lucode.hackware.magicindicator.buildins.commonnavigator.indicators.LinePagerIndicator; import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.ColorTransitionPagerTitleView; +import java.io.IOException; import java.util.List; import java.util.Locale; @@ -62,6 +66,7 @@ public class GoogleFragment extends Fragment { private WebView rlWebview; private String url; + String adid = null; @SuppressLint("ValidFragment") public GoogleFragment(String urls) { url = urls; @@ -76,7 +81,27 @@ public class GoogleFragment extends Fragment { Log.e("ttt",url); rlWebview.loadUrl(url); initGooglePay(); + new Thread(new Runnable() { + public void run() { + try { + + + try { + adid = AdvertisingIdClient.getAdvertisingIdInfo(getActivity()).getId(); + Log.e("vssss",adid); + } catch (IOException e) { + e.printStackTrace(); + } catch (GooglePlayServicesNotAvailableException e) { + e.printStackTrace(); + } catch (GooglePlayServicesRepairableException e) { + e.printStackTrace(); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + }).start(); WebSettings webSettings = rlWebview.getSettings(); webSettings.setDomStorageEnabled(true); @@ -228,13 +253,19 @@ public class GoogleFragment extends Fragment { } } }); + AdjustEvent adjustEvent2 = new AdjustEvent("tr8lb9"); adjustEvent2.setRevenue(Double.parseDouble(MoneyUsds),"HKD"); + adjustEvent.addCallbackParameter("GOrderid",purchase.getOrderId()); + adjustEvent.addCallbackParameter("POrderid",mOrderid); + adjustEvent.addCallbackParameter("Uid",CommonAppConfig.getInstance().getUid()); +// String adid = AdvertisingIdClient.getAdvertisingIdInfo(getActivity()).getId(); +// ToastUtil.show(adid); + +// adjustEvent.addCallbackParameter("GADid",adid); adjustEvent2.setOrderId(mOrderid); Adjust.trackEvent(adjustEvent2); - - ToastUtil.show("购买成功"); getActivity().onBackPressed(); }catch (Exception e){ diff --git a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java index 40097ecc3..49f6d7986 100644 --- a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java @@ -58,6 +58,8 @@ import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; +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; import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; @@ -316,6 +318,10 @@ public class LoginActivity extends AbsActivity { public void onSuccess(int code, String msg, String[] info) { if (info[0] != null && mFirstLogin == true) { JSONObject obj = JSON.parseObject(info[0]); + 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"); + } MainActivity.forward(LoginActivity.this, false); finish(); gotoLive(obj.getString("anchor_id")); diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index 54d5bd070..e9a4ed7d0 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -31,6 +31,9 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.android.billingclient.api.Purchase; import com.android.billingclient.api.SkuDetails; +import com.google.android.gms.ads.identifier.AdvertisingIdClient; +import com.google.android.gms.common.GooglePlayServicesNotAvailableException; +import com.google.android.gms.common.GooglePlayServicesRepairableException; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.tencent.imsdk.v2.V2TIMCallback; @@ -103,6 +106,7 @@ import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; import java.io.File; +import java.io.IOException; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -251,7 +255,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene .build(MainActivity.this); rt_main_tab = (RelativeLayout) findViewById(R.id.rt_main_tab); - v_table_redpoint = findViewById(R.id.v_table_redpoint); v_table_redpoint_me = (View) findViewById(R.id.v_table_redpoint_me); diff --git a/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java b/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java index b62f6ecf7..e9b9abce7 100644 --- a/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java @@ -65,6 +65,8 @@ import org.greenrobot.eventbus.ThreadMode; import java.util.ArrayList; import java.util.Locale; +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; import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; @@ -527,6 +529,10 @@ public class RegisterActivity extends AbsActivity { JSONObject obj = JSON.parseObject(info[0]); IMLoginManager.get(activity).setisNewUserOne(true); IMLoginManager.get(activity).setNewUserGif(true); + 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"); + } gotoLive(obj.getString("anchor_id")); if (obj.containsKey("home_zdy_pop")) { NoviceInstructorManager.get(mContext).setHomeZdyPop(obj.getString("home_zdy_pop")); diff --git a/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java b/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java index 60448707f..451c3a780 100644 --- a/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java +++ b/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java @@ -33,6 +33,8 @@ import com.yunbao.main.R; import com.yunbao.main.activity.EntryActivity; import com.yunbao.main.activity.MainActivity; +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; import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; @@ -118,6 +120,10 @@ public class OneLoginDialog extends AbsDialogFragment { dismiss(); if (info[0] != null) { JSONObject obj = JSON.parseObject(info[0]); + 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"); + } MainActivity.forward(getContext(), false); IMLoginManager.get(mContext).setNewUserGif(true); IMLoginManager.get(mContext).setisNewUserOne(true);