Merge remote-tracking branch 'origin/master'

This commit is contained in:
18401019693 2022-08-08 10:39:07 +08:00
commit ea333b24a4
20 changed files with 201 additions and 73 deletions

View File

@ -37,6 +37,8 @@ public class CommonAppContext extends MultiDexApplication {
public static FirebaseAnalytics mFirebaseAnalytics; public static FirebaseAnalytics mFirebaseAnalytics;
public static AppEventsLogger logger; public static AppEventsLogger logger;
public static boolean isReady = false; public static boolean isReady = false;
public static String home_zdy_img_us = "";
public static String home_zdy_img_cn = "";
@Override @Override
public void onCreate() { public void onCreate() {

View File

@ -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;
}
}

View File

@ -5,6 +5,7 @@ import android.view.Gravity;
import android.view.View; import android.view.View;
import android.view.Window; import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.ImageView;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment; import androidx.fragment.app.DialogFragment;
@ -13,18 +14,28 @@ import androidx.fragment.app.FragmentTransaction;
import com.adjust.sdk.Adjust; import com.adjust.sdk.Adjust;
import com.adjust.sdk.AdjustEvent; import com.adjust.sdk.AdjustEvent;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.facebook.appevents.AppEventsLogger; import com.facebook.appevents.AppEventsLogger;
import com.google.firebase.analytics.FirebaseAnalytics; import com.google.firebase.analytics.FirebaseAnalytics;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.R; import com.yunbao.common.R;
import com.yunbao.common.event.InstructorOperationEvent; import com.yunbao.common.event.InstructorOperationEvent;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.http.HttpCallback; 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 com.yunbao.common.manager.NoviceInstructorManager;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import java.lang.reflect.Field; 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 { public class InstructorOperationDialog extends AbsDialogFragment {
@Override @Override
@ -84,8 +95,15 @@ public class InstructorOperationDialog extends AbsDialogFragment {
@Override @Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) { public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(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(""); 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 @Override
public void onClick(View v) { public void onClick(View v) {
AdjustEvent adjustEvent1 = new AdjustEvent("82nzkz"); AdjustEvent adjustEvent1 = new AdjustEvent("82nzkz");

View File

@ -2,12 +2,16 @@ package com.yunbao.common.http;
import com.yunbao.common.bean.AnchorRecommendModel; import com.yunbao.common.bean.AnchorRecommendModel;
import com.yunbao.common.bean.BaseModel; import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.FaceBookUpModel;
import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.LiveInfoModel; import com.yunbao.common.bean.LiveInfoModel;
import com.yunbao.common.bean.NobleTrumpetModel; import com.yunbao.common.bean.NobleTrumpetModel;
import com.yunbao.common.bean.SearchModel; import com.yunbao.common.bean.SearchModel;
import com.yunbao.common.bean.SetAttentsModel; import com.yunbao.common.bean.SetAttentsModel;
import org.json.JSONObject;
import java.util.HashMap;
import java.util.List; import java.util.List;
import io.reactivex.Observable; import io.reactivex.Observable;
@ -61,6 +65,12 @@ public interface PDLiveApi {
@Query("trumpet_msg") String trumpetMsg, @Query("trumpet_msg") String trumpetMsg,
@Query("anchor_id") String anchorid); @Query("anchor_id") String anchorid);
/**
* FB是否替换新key
*/
@GET("/api/public/?service=Login.getFaceBookUpType")
Observable<ResponseModel<FaceBookUpModel>> faceBookUp();
/** /**
* 搜索 * 搜索
* *

View File

@ -2,6 +2,7 @@ package com.yunbao.common.http.main;
import android.app.Activity; import android.app.Activity;
import com.yunbao.common.bean.FaceBookUpModel;
import com.yunbao.common.bean.AnchorRecommendModel; import com.yunbao.common.bean.AnchorRecommendModel;
import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.SearchModel; 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.ResponseModel;
import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.base.HttpCallback;
import org.json.JSONObject;
import java.util.List; import java.util.List;
import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.android.schedulers.AndroidSchedulers;
@ -66,21 +69,19 @@ public class MainNetManager {
} }
/** /**
* 搜索 * FB是否替换新Key
* * @param callback
* @param jianKey 簡體關鍵字
* @param fanKey 繁體關鍵字
* @param type 搜索類型 1全部 2主播 3用戶
* @param p 頁碼
*/ */
public void search(String jianKey, String fanKey, int type, int p, HttpCallback<List<List<SearchModel>>> callback) { public void FaceBookUp(HttpCallback<FaceBookUpModel> callback) {
API.get().pdLiveApi(mContext).search(jianKey, fanKey, type, p) API.get().pdLiveApi(mContext).faceBookUp()
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(listResponseModel -> { .subscribe(new Consumer<ResponseModel<FaceBookUpModel>>() {
@Override
public void accept(ResponseModel<FaceBookUpModel> obj) throws Exception {
if (callback != null) { if (callback != null) {
List<List<SearchModel>> model = listResponseModel.getData().getInfo(); callback.onSuccess(obj.getData().getInfo());
callback.onSuccess(model); }
} }
}, throwable -> { }, throwable -> {
if (callback != null) { if (callback != null) {
@ -88,31 +89,6 @@ public class MainNetManager {
} }
}).isDisposed(); }).isDisposed();
} }
/**
* 搜索
*
* @param jianKey 簡體關鍵字
* @param fanKey 繁體關鍵字
* @param type 搜索類型 1全部 2主播 3用戶
* @param p 頁碼
*/
public void searchNew(String jianKey, String fanKey, int type, int p, HttpCallback<List<SearchModel>> callback) {
API.get().pdLiveApi(mContext).searchNew(jianKey, fanKey, type, p)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(listResponseModel -> {
if (callback != null) {
List<SearchModel> model = listResponseModel.getData().getInfo();
callback.onSuccess(model);
}
}, throwable -> {
if (callback != null) {
callback.onError(throwable.getMessage());
}
}).isDisposed();
}
/** /**
* 猜你喜欢 * 猜你喜欢
* *

View File

@ -8,11 +8,12 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="350dp" android:layout_height="320dp"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="66dp" android:layout_marginTop="86dp"
android:background="@mipmap/tip_box" android:background="@mipmap/tip_box"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:visibility="gone"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
@ -20,6 +21,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="85dp" android:layout_marginTop="85dp"
android:text="@string/welcome_pd" android:text="@string/welcome_pd"
android:gravity="center"
android:layout_gravity="center"
android:textColor="#FF1A1A1A" android:textColor="#FF1A1A1A"
android:textSize="21sp" android:textSize="21sp"
android:textStyle="bold" /> android:textStyle="bold" />
@ -30,6 +33,7 @@
android:layout_marginTop="14dp" android:layout_marginTop="14dp"
android:text="@string/welcome_pd_tip" android:text="@string/welcome_pd_tip"
android:textColor="#FFF19DA0" android:textColor="#FFF19DA0"
android:visibility="gone"
android:textSize="12sp" /> android:textSize="12sp" />
@ -48,17 +52,20 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:drawableLeft="@mipmap/icon_love_message"
android:drawablePadding="3dp" android:drawablePadding="3dp"
android:text="@string/do_you_like_find" android:text="@string/welcome_pd_tip"
android:textColor="#FFFFBE41" android:layout_marginRight="25dp"
android:textSize="16sp" android:layout_marginLeft="25dp"
android:gravity="center"
android:textColor="#FF4659"
android:textSize="12sp"
android:layout_marginTop="5dp"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_marginTop="15dp"
android:gravity="center" android:gravity="center"
android:text="@string/exclusive_instructor1" android:text="@string/exclusive_instructor1"
android:textColor="#FF737373" android:textColor="#FF737373"
@ -67,8 +74,8 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center" android:gravity="center"
android:layout_marginBottom="5dp"
android:text="@string/exclusive_instructor2" android:text="@string/exclusive_instructor2"
android:textColor="#FF737373" android:textColor="#FF737373"
android:textSize="10sp" /> android:textSize="10sp" />
@ -86,7 +93,7 @@
android:layout_height="35dp" android:layout_height="35dp"
android:layout_marginStart="30dp" android:layout_marginStart="30dp"
android:layout_marginEnd="30dp" android:layout_marginEnd="30dp"
android:layout_marginBottom="30dp" android:layout_marginBottom="20dp"
android:orientation="vertical" android:orientation="vertical"
app:cardBackgroundColor="#FFFFBE41" app:cardBackgroundColor="#FFFFBE41"
app:cardCornerRadius="20dp" app:cardCornerRadius="20dp"
@ -114,6 +121,16 @@
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true"/>
<ImageView android:id="@+id/to_msg"
android:layout_width="500dp"
android:layout_height="500dp"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:background="@mipmap/top_zhidao_bg" /> android:layout_centerVertical="true"
android:layout_marginRight="30dp"
android:layout_marginLeft="30dp"
android:layout_marginTop="86dp"
android:gravity="center_horizontal"/>
</RelativeLayout> </RelativeLayout>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 KiB

After

Width:  |  Height:  |  Size: 288 KiB

View File

@ -833,11 +833,12 @@
<string name="live_hot_ruletext22">前往「個人中心」-「我的包裹」中,即可使用熱度卡。</string> <string name="live_hot_ruletext22">前往「個人中心」-「我的包裹」中,即可使用熱度卡。</string>
<string name="live_hot_ruletext31">熱度卡生效多久?</string> <string name="live_hot_ruletext31">熱度卡生效多久?</string>
<string name="live_hot_ruletext32">對指定主播使用熱度卡後將會立即生效效果時長為24小時不管主播是否在線熱度時長都將會持續減少</string> <string name="live_hot_ruletext32">對指定主播使用熱度卡後將會立即生效效果時長為24小時不管主播是否在線熱度時長都將會持續減少</string>
<string name="welcome_pd">Welcome to PD LIVE</string> <string name="welcome_pd">Rewards coming!</string>
<string name="welcome_pd_tip">Here are all kinds of interesting anchor\n And a variety of activities to play</string> <string name="welcome_pd_tip">Receive free
Limited ride And limited avatar frame</string>
<string name="do_you_like_find">Looking for you like?</string> <string name="do_you_like_find">Looking for you like?</string>
<string name="exclusive_instructor1">Contact your dedicated mentor to We can</string> <string name="exclusive_instructor1">Go contact your personal guide to</string>
<string name="exclusive_instructor2">match you with more styles of anchor!</string> <string name="exclusive_instructor2">get your prize redemption code!</string>
<string name="hurry_contact">Contact a mentor now!</string> <string name="hurry_contact">Contact a mentor now!</string>
<string name="withdraw_success">Withdrawal succeeded</string> <string name="withdraw_success">Withdrawal succeeded</string>
<string name="normal_barrage">normal barrage</string> <string name="normal_barrage">normal barrage</string>

View File

@ -847,11 +847,11 @@
<string name="live_hot_ruletext31">熱度卡生效多久?</string> <string name="live_hot_ruletext31">熱度卡生效多久?</string>
<string name="live_hot_ruletext32">對指定主播使用熱度卡後將會立即生效效果時長為24小時不管主播是否在線熱度時長都將會持續減少</string> <string name="live_hot_ruletext32">對指定主播使用熱度卡後將會立即生效效果時長為24小時不管主播是否在線熱度時長都將會持續減少</string>
<string name="quote">引用</string> <string name="quote">引用</string>
<string name="welcome_pd">歡迎來到PD LIVE</string> <string name="welcome_pd">你被大獎砸中啦!</string>
<string name="welcome_pd_tip">這有各類好看有趣的主播\n還有各種豐富的活動玩法</string> <string name="welcome_pd_tip">限定好禮 免費領取 \n限定座駕和限定頭像框</string>
<string name="do_you_like_find">在找您喜歡的主播嗎?</string> <string name="do_you_like_find">在找您喜歡的主播嗎?</string>
<string name="exclusive_instructor1">聯系您的專屬指導員</string> <string name="exclusive_instructor1">恭喜你成為今日幸運新人</string>
<string name="exclusive_instructor2">給您匹配更多風格的主播唷!</string> <string name="exclusive_instructor2">快去聯繫你的專屬指導員\n領取大獎兌換碼吧!</string>
<string name="hurry_contact">趕快聯系他/她吧!</string> <string name="hurry_contact">趕快聯系他/她吧!</string>
<string name="withdraw_success">撤回成功</string> <string name="withdraw_success">撤回成功</string>
<string name="normal_barrage">普通彈幕</string> <string name="normal_barrage">普通彈幕</string>

View File

@ -4,8 +4,8 @@ ext {
buildToolsVersion: "28.0.3", buildToolsVersion: "28.0.3",
minSdkVersion : 21, minSdkVersion : 21,
targetSdkVersion : 30, targetSdkVersion : 30,
versionCode : 201, versionCode : 202,
versionName : "6.3.7" versionName : "6.3.8"
] ]
manifestPlaceholders = [ manifestPlaceholders = [
// //
@ -24,6 +24,6 @@ ext {
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S", baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
// true表示谷歌支付 false // true表示谷歌支付 false
isGooglePlay : true isGooglePlay : false
] ]
} }

View File

@ -32,6 +32,7 @@ import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.manager.NoviceInstructorManager; import com.yunbao.common.manager.NoviceInstructorManager;
import com.yunbao.common.manager.imrongcloud.MessageIMManager; import com.yunbao.common.manager.imrongcloud.MessageIMManager;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.live.R; import com.yunbao.live.R;
import com.yunbao.live.bean.SearchUserBean; import com.yunbao.live.bean.SearchUserBean;
import com.yunbao.live.dialog.MenuPopuwWindow; 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")) { if (!TextUtils.isEmpty(userBean.getIs_admin()) && TextUtils.equals(userBean.getIs_admin(), "1")) {
isAdmin = true; isAdmin = true;
imgMore.setVisibility(View.GONE); imgMore.setVisibility(View.GONE);
AdjustEvent adjustEvent1 = new AdjustEvent("ww5z2p"); AdjustEvent adjustEvent1 = new AdjustEvent("exlgn3");
Adjust.trackEvent(adjustEvent1); Adjust.trackEvent(adjustEvent1);
CommonHttpUtil.setAdvertisingChannels("ww5z2p", new HttpCallback() { CommonHttpUtil.setAdvertisingChannels("exlgn3", new HttpCallback() {
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
if (code == 0) { if (code == 0) {
FirebaseAnalytics.getInstance(mContext).logEvent("FS_customer_service", null); FirebaseAnalytics.getInstance(mContext).logEvent("FS_director_read", null);
AppEventsLogger.newLogger(mContext).logEvent("FB_customer_service"); AppEventsLogger.newLogger(mContext).logEvent("FB_director_read");
} }
} }
}); });

View File

@ -171,7 +171,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
//单选选中监听 //单选选中监听
radioHornType.setOnCheckedChangeListener(changeListener); radioHornType.setOnCheckedChangeListener(changeListener);
radioHornType.getCheckedRadioButtonId(); radioHornType.getCheckedRadioButtonId();
netHandler.post(getNobleTrumpetNumRunnable); // netHandler.post(getNobleTrumpetNumRunnable);
} }
@Override @Override

View File

@ -121,8 +121,8 @@ public class NewUserDialog extends AbsDialogFragment {
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
if (code == 0) { if (code == 0) {
FirebaseAnalytics.getInstance(getContext()).logEvent("FS_newbie_reward", null); FirebaseAnalytics.getInstance(mContext).logEvent("FS_newbie_reward", null);
AppEventsLogger.newLogger(getContext()).logEvent("FB_newbie_reward"); AppEventsLogger.newLogger(mContext).logEvent("FB_newbie_reward");
} }
} }
}); });

View File

@ -140,7 +140,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
public void onUpdata(String str) { public void onUpdata(String str) {
if ("showBanner".equals(str)) { if ("showBanner".equals(str)) {
showBanner3(); 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"); AdjustEvent adjustEvent1 = new AdjustEvent("80lzdi");
Adjust.trackEvent(adjustEvent1); Adjust.trackEvent(adjustEvent1);
CommonHttpUtil.setAdvertisingChannels("80lzdi", new HttpCallback() { 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"); mBannerList3.get(1).setLink("1");
AdjustEvent adjustEvent1 = new AdjustEvent("f084wh"); AdjustEvent adjustEvent1 = new AdjustEvent("f084wh");
Adjust.trackEvent(adjustEvent1); 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"); AdjustEvent adjustEvent1 = new AdjustEvent("aqqz70");
Adjust.trackEvent(adjustEvent1); Adjust.trackEvent(adjustEvent1);
CommonHttpUtil.setAdvertisingChannels("aqqz70", new HttpCallback() { CommonHttpUtil.setAdvertisingChannels("aqqz70", new HttpCallback() {

View File

@ -67,12 +67,16 @@ import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants; import com.yunbao.common.Constants;
import com.yunbao.common.HtmlConfig; import com.yunbao.common.HtmlConfig;
import com.yunbao.common.activity.WebViewActivity; 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.IMLoginModel;
import com.yunbao.common.bean.LoginData; import com.yunbao.common.bean.LoginData;
import com.yunbao.common.bean.UserBean; import com.yunbao.common.bean.UserBean;
import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.HttpClient; 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.interfaces.CommonCallback;
import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.manager.NoviceInstructorManager; 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.EventBus;
import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode; import org.greenrobot.eventbus.ThreadMode;
import org.json.JSONException;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
import io.rong.imlib.RongIMClient; import io.rong.imlib.RongIMClient;
import io.rong.message.TextMessage; 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.logger;
import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
@ -273,7 +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")); 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); IMLoginManager.get(EntryActivity.this).setisNewUserOne(true);
MainActivity.forward(EntryActivity.this, false); MainActivity.forward(EntryActivity.this, false);
gotoLive(obj.getString("anchor_id")); 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")) { if (obj.containsKey("home_zdy_pop")) {
NoviceInstructorManager.get(activity).setHomeZdyPop(obj.getString("home_zdy_pop")); NoviceInstructorManager.get(activity).setHomeZdyPop(obj.getString("home_zdy_pop"));
} }

View File

@ -24,6 +24,9 @@ import com.adjust.sdk.AdjustEvent;
import com.android.billingclient.api.Purchase; import com.android.billingclient.api.Purchase;
import com.android.billingclient.api.SkuDetails; import com.android.billingclient.api.SkuDetails;
import com.facebook.appevents.AppEventsConstants; 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.google.firebase.analytics.FirebaseAnalytics;
import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.http.CommonHttpUtil; 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.indicators.LinePagerIndicator;
import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.ColorTransitionPagerTitleView; import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.ColorTransitionPagerTitleView;
import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
@ -62,6 +66,7 @@ public class GoogleFragment extends Fragment {
private WebView rlWebview; private WebView rlWebview;
private String url; private String url;
String adid = null;
@SuppressLint("ValidFragment") @SuppressLint("ValidFragment")
public GoogleFragment(String urls) { public GoogleFragment(String urls) {
url = urls; url = urls;
@ -76,7 +81,27 @@ public class GoogleFragment extends Fragment {
Log.e("ttt",url); Log.e("ttt",url);
rlWebview.loadUrl(url); rlWebview.loadUrl(url);
initGooglePay(); 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 webSettings = rlWebview.getSettings();
webSettings.setDomStorageEnabled(true); webSettings.setDomStorageEnabled(true);
@ -228,13 +253,19 @@ public class GoogleFragment extends Fragment {
} }
} }
}); });
AdjustEvent adjustEvent2 = new AdjustEvent("tr8lb9"); AdjustEvent adjustEvent2 = new AdjustEvent("tr8lb9");
adjustEvent2.setRevenue(Double.parseDouble(MoneyUsds),"HKD"); 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); adjustEvent2.setOrderId(mOrderid);
Adjust.trackEvent(adjustEvent2); Adjust.trackEvent(adjustEvent2);
ToastUtil.show("购买成功"); ToastUtil.show("购买成功");
getActivity().onBackPressed(); getActivity().onBackPressed();
}catch (Exception e){ }catch (Exception e){

View File

@ -58,6 +58,8 @@ import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode; 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.logger;
import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; 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) { public void onSuccess(int code, String msg, String[] info) {
if (info[0] != null && mFirstLogin == true) { if (info[0] != null && mFirstLogin == true) {
JSONObject obj = JSON.parseObject(info[0]); 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); MainActivity.forward(LoginActivity.this, false);
finish(); finish();
gotoLive(obj.getString("anchor_id")); gotoLive(obj.getString("anchor_id"));

View File

@ -31,6 +31,9 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.android.billingclient.api.Purchase; import com.android.billingclient.api.Purchase;
import com.android.billingclient.api.SkuDetails; 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.Gson;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import com.tencent.imsdk.v2.V2TIMCallback; import com.tencent.imsdk.v2.V2TIMCallback;
@ -103,6 +106,7 @@ import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode; import org.greenrobot.eventbus.ThreadMode;
import java.io.File; import java.io.File;
import java.io.IOException;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -251,7 +255,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
.build(MainActivity.this); .build(MainActivity.this);
rt_main_tab = (RelativeLayout) findViewById(R.id.rt_main_tab); rt_main_tab = (RelativeLayout) findViewById(R.id.rt_main_tab);
v_table_redpoint = findViewById(R.id.v_table_redpoint); v_table_redpoint = findViewById(R.id.v_table_redpoint);
v_table_redpoint_me = (View) findViewById(R.id.v_table_redpoint_me); v_table_redpoint_me = (View) findViewById(R.id.v_table_redpoint_me);

View File

@ -65,6 +65,8 @@ import org.greenrobot.eventbus.ThreadMode;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Locale; 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.logger;
import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
@ -527,6 +529,10 @@ public class RegisterActivity extends AbsActivity {
JSONObject obj = JSON.parseObject(info[0]); JSONObject obj = JSON.parseObject(info[0]);
IMLoginManager.get(activity).setisNewUserOne(true); IMLoginManager.get(activity).setisNewUserOne(true);
IMLoginManager.get(activity).setNewUserGif(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")); gotoLive(obj.getString("anchor_id"));
if (obj.containsKey("home_zdy_pop")) { if (obj.containsKey("home_zdy_pop")) {
NoviceInstructorManager.get(mContext).setHomeZdyPop(obj.getString("home_zdy_pop")); NoviceInstructorManager.get(mContext).setHomeZdyPop(obj.getString("home_zdy_pop"));

View File

@ -33,6 +33,8 @@ import com.yunbao.main.R;
import com.yunbao.main.activity.EntryActivity; import com.yunbao.main.activity.EntryActivity;
import com.yunbao.main.activity.MainActivity; 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.logger;
import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
@ -118,6 +120,10 @@ public class OneLoginDialog extends AbsDialogFragment {
dismiss(); dismiss();
if (info[0] != null) { if (info[0] != null) {
JSONObject obj = JSON.parseObject(info[0]); 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); MainActivity.forward(getContext(), false);
IMLoginManager.get(mContext).setNewUserGif(true); IMLoginManager.get(mContext).setNewUserGif(true);
IMLoginManager.get(mContext).setisNewUserOne(true); IMLoginManager.get(mContext).setisNewUserOne(true);