From 07ce36e549593c51f9de625604f29fbe4257a933 Mon Sep 17 00:00:00 2001 From: 18142669586 <1669783059@qq.com> Date: Wed, 31 Aug 2022 20:33:23 +0800 Subject: [PATCH] 111 --- .../common/http/live/LiveNetManager.java | 1 + .../yunbao/main/activity/GoogleFragment.java | 2 +- .../yunbao/main/activity/MainActivity.java | 23 +++++++++++++++++-- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java index 2689c995c..72d1e8942 100644 --- a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java +++ b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java @@ -16,6 +16,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.functions.Consumer; import io.reactivex.schedulers.Schedulers; + /** * 直播网络请求整合 */ 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 128a6e1aa..268a25f29 100644 --- a/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java +++ b/main/src/main/java/com/yunbao/main/activity/GoogleFragment.java @@ -62,7 +62,7 @@ public class GoogleFragment extends Fragment { private View view; - private String mOrderid,mProductId,MoneyUsds; + public static String mOrderid,mProductId,MoneyUsds; private WebView rlWebview; private String url; 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 4a5648ee9..810de03b9 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -26,14 +26,21 @@ import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import androidx.annotation.RequiresApi; import androidx.viewpager.widget.ViewPager; +import com.adjust.sdk.Adjust; +import com.adjust.sdk.AdjustEvent; import com.alibaba.android.arouter.facade.annotation.Route; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.android.billingclient.api.BillingResult; import com.android.billingclient.api.Purchase; +import com.android.billingclient.api.PurchaseHistoryRecord; +import com.android.billingclient.api.PurchaseHistoryResponseListener; import com.android.billingclient.api.SkuDetails; +import com.facebook.appevents.AppEventsConstants; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.Task; import com.google.firebase.messaging.FirebaseMessaging; @@ -65,6 +72,7 @@ import com.yunbao.common.event.NoviceInstructorEvent; import com.yunbao.common.event.RongIMConnectionStatusEvent; import com.yunbao.common.event.UpdateTablePointMe; import com.yunbao.common.http.CommonHttpConsts; +import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.main.MainNetManager; import com.yunbao.common.interfaces.CommonCallback; @@ -135,6 +143,8 @@ import io.rong.imlib.RongIMClient; import kotlin.Unit; import static com.yunbao.common.CommonAppContext.isReady; +import static com.yunbao.common.CommonAppContext.logger; +import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; import static com.yunbao.live.activity.SystemMessageActivity.type; import io.rong.imlib.model.Message; @@ -204,6 +214,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene @Override public void onQuerySuccess(@NonNull String skuType, @NonNull List list, boolean isSelf) { + Log.d(TAG, "1111"); } @@ -218,8 +229,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene return false; } googleBillingUtil.consumeAsync(MainActivity.this, purchase.getPurchaseToken()); - - } else { tempBuffer.append("暂未支付:"); @@ -233,6 +242,15 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene @Override public boolean onRecheck(@NonNull String skuType, @NonNull Purchase purchase, boolean isSelf) { + Log.e(TAG,purchase.getSku()+"s"+purchase.getOrderId()+"sds"+purchase.getPurchaseToken()); + //谷歌掉单处理 + CommonHttpUtil.Google_sec_pay(purchase.getPurchaseToken(),purchase.getOrderId(),purchase.getSku(),new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + + } + }); + StringBuffer tempBuffer = new StringBuffer(); tempBuffer.append("检测到未处理的订单($skuType):${purchase.sku}()"); Log.d(TAG, tempBuffer.toString()); @@ -310,6 +328,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene .addOnGoogleBillingListener(MainActivity.this, mOnMyGoogleBillingListener) .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);