feat:删除Appsflyer-SDK、删除SUD-SDK

This commit is contained in:
Max
2023-11-26 12:14:06 +08:00
parent f430241d9f
commit 066bcde63c
5 changed files with 91 additions and 90 deletions

View File

@@ -271,7 +271,7 @@ dependencies {
implementation 'com.github.mmin18:realtimeblurview:1.2.1'
implementation 'com.appsflyer:af-android-sdk:6.8.2'
// implementation 'com.appsflyer:af-android-sdk:6.8.2'
implementation 'com.github.zhpanvip:BannerViewPager:3.5.6'
@@ -293,7 +293,7 @@ dependencies {
//wheelView
implementation 'com.contrarywind:wheelview:4.1.0'
implementation 'tech.sud.mgp:SudMGP-static:1.3.3.1158'
// implementation 'tech.sud.mgp:SudMGP-static:1.3.3.1158'
implementation project(':modules:module_base')
if (!isolationMode) {

View File

@@ -16,9 +16,9 @@ import android.view.WindowManager
import android.widget.PopupWindow
import android.widget.TextView
import androidx.recyclerview.widget.GridLayoutManager
import com.appsflyer.AFInAppEventParameterName
import com.appsflyer.AFInAppEventType
import com.appsflyer.AppsFlyerLib
//import com.appsflyer.AFInAppEventParameterName
//import com.appsflyer.AFInAppEventType
//import com.appsflyer.AppsFlyerLib
import com.example.module_base.support.billing.IBillingResult
import com.example.module_base.support.billing.IBillingService
import com.example.module_base.support.billing.IProductDetails
@@ -276,35 +276,35 @@ class FirstChargeDialog : BaseViewBindingActivity<DialogFirstChargeBinding>(),
{ token: String ->
//L.i("token=" + token);
billingManager?.consumeAsync(token)
var skuDetails: IProductDetails? = null
val goodList = goodsList
if (!goodList.isNullOrEmpty()) {
for (datum in goodList) {
if (datum.chargeProdId == purchase.getProducts()[0]) {
skuDetails = datum.productDetails
break
}
}
}
if (skuDetails != null) {
val eventValue: MutableMap<String, Any> =
HashMap()
eventValue[AFInAppEventParameterName.CONTENT_TYPE] = "Gold"
eventValue[AFInAppEventParameterName.QUANTITY] = 1
eventValue[AFInAppEventParameterName.CONTENT_ID] = purchase.getOrderId()!!
skuDetails.getOneTimePurchaseOfferDetails()?.let {
eventValue[AFInAppEventParameterName.REVENUE] =
it.getPriceAmountMicros() / 1000000f
eventValue["Price"] = it.getFormattedPrice()
eventValue[AFInAppEventParameterName.CURRENCY] =
it.getPriceCurrencyCode()
}
AppsFlyerLib.getInstance().logEvent(
applicationContext,
AFInAppEventType.PURCHASE,
eventValue
)
}
// var skuDetails: IProductDetails? = null
// val goodList = goodsList
// if (!goodList.isNullOrEmpty()) {
// for (datum in goodList) {
// if (datum.chargeProdId == purchase.getProducts()[0]) {
// skuDetails = datum.productDetails
// break
// }
// }
// }
// if (skuDetails != null) {
// val eventValue: MutableMap<String, Any> =
// HashMap()
// eventValue[AFInAppEventParameterName.CONTENT_TYPE] = "Gold"
// eventValue[AFInAppEventParameterName.QUANTITY] = 1
// eventValue[AFInAppEventParameterName.CONTENT_ID] = purchase.getOrderId()!!
// skuDetails.getOneTimePurchaseOfferDetails()?.let {
// eventValue[AFInAppEventParameterName.REVENUE] =
// it.getPriceAmountMicros() / 1000000f
// eventValue["Price"] = it.getFormattedPrice()
// eventValue[AFInAppEventParameterName.CURRENCY] =
// it.getPriceCurrencyCode()
// }
// AppsFlyerLib.getInstance().logEvent(
// applicationContext,
// AFInAppEventType.PURCHASE,
// eventValue
// )
// }
}
) { throwable: Throwable ->
if (throwable !is IgnoreException) {

View File

@@ -7,7 +7,6 @@ import android.text.style.ForegroundColorSpan;
import androidx.core.content.ContextCompat;
import com.appsflyer.internal.components.network.http.exceptions.HttpException;
import com.chwl.app.R;
import com.chwl.app.base.BaseActivity;
import com.chwl.core.auth.AuthModel;
@@ -24,6 +23,8 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import retrofit2.HttpException;
/**
* create by lvzebiao @2019/12/9
*/

View File

@@ -22,9 +22,9 @@ import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
import com.appsflyer.AFInAppEventParameterName;
import com.appsflyer.AFInAppEventType;
import com.appsflyer.AppsFlyerLib;
//import com.appsflyer.AFInAppEventParameterName;
//import com.appsflyer.AFInAppEventType;
//import com.appsflyer.AppsFlyerLib;
import com.example.module_base.support.billing.IBillingService;
import com.example.module_base.support.billing.IProductDetails;
import com.example.module_base.support.billing.IPurchase;
@@ -228,25 +228,25 @@ public class ChargeActivity extends BaseMvpActivity<IChargeView, ChargePresenter
.subscribe(token -> {
billingManager.consumeAsync(token);
IProductDetails productDetails = null;
for (ChargeBean datum : mChargeAdapter.getData()) {
if (datum.getChargeProdId().equals(purchase.getProducts().get(0))) {
productDetails = datum.getProductDetails();
break;
}
}
if (productDetails != null) {
Map<String, Object> eventValue = new HashMap<>();
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "Gold");
eventValue.put(AFInAppEventParameterName.QUANTITY, 1);
eventValue.put(AFInAppEventParameterName.CONTENT_ID, purchase.getOrderId());
if (productDetails.getOneTimePurchaseOfferDetails() != null) {
eventValue.put(AFInAppEventParameterName.REVENUE, productDetails.getOneTimePurchaseOfferDetails().getPriceAmountMicros() / 1000000f);
eventValue.put("Price", productDetails.getOneTimePurchaseOfferDetails().getFormattedPrice());
eventValue.put(AFInAppEventParameterName.CURRENCY, productDetails.getOneTimePurchaseOfferDetails().getPriceCurrencyCode());
}
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), AFInAppEventType.PURCHASE, eventValue);
}
// IProductDetails productDetails = null;
// for (ChargeBean datum : mChargeAdapter.getData()) {
// if (datum.getChargeProdId().equals(purchase.getProducts().get(0))) {
// productDetails = datum.getProductDetails();
// break;
// }
// }
// if (productDetails != null) {
// Map<String, Object> eventValue = new HashMap<>();
// eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "Gold");
// eventValue.put(AFInAppEventParameterName.QUANTITY, 1);
// eventValue.put(AFInAppEventParameterName.CONTENT_ID, purchase.getOrderId());
// if (productDetails.getOneTimePurchaseOfferDetails() != null) {
// eventValue.put(AFInAppEventParameterName.REVENUE, productDetails.getOneTimePurchaseOfferDetails().getPriceAmountMicros() / 1000000f);
// eventValue.put("Price", productDetails.getOneTimePurchaseOfferDetails().getFormattedPrice());
// eventValue.put(AFInAppEventParameterName.CURRENCY, productDetails.getOneTimePurchaseOfferDetails().getPriceCurrencyCode());
// }
// AppsFlyerLib.getInstance().logEvent(getApplicationContext(), AFInAppEventType.PURCHASE, eventValue);
// }
},
throwable -> {
if (!(throwable instanceof IgnoreException)) {

View File

@@ -12,9 +12,9 @@ import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.isInvisible
import androidx.core.view.isVisible
import androidx.recyclerview.widget.GridLayoutManager
import com.appsflyer.AFInAppEventParameterName
import com.appsflyer.AFInAppEventType
import com.appsflyer.AppsFlyerLib
//import com.appsflyer.AFInAppEventParameterName
//import com.appsflyer.AFInAppEventType
//import com.appsflyer.AppsFlyerLib
import com.example.module_base.support.billing.IBillingResult
import com.example.module_base.support.billing.IBillingService
import com.example.module_base.support.billing.IProductDetails
@@ -453,36 +453,36 @@ class VipMainActivity : BaseViewBindingActivity<ActivityVipMainBinding>(),
{ token: String ->
//L.i("token=" + token);
billingManager?.consumeAsync(token)
var skuDetails: IProductDetails? = null
if (googleChargeBean?.getChargeProdId() == purchase.getProducts()
.firstOrNull()
) {
skuDetails = googleChargeBean?.productDetails
}
if (skuDetails != null) {
val eventValue: MutableMap<String, Any> =
HashMap()
eventValue[AFInAppEventParameterName.CONTENT_TYPE] = "Gold"
eventValue[AFInAppEventParameterName.QUANTITY] = 1
eventValue[AFInAppEventParameterName.CONTENT_ID] =
purchase.getOrderId()!!
if (skuDetails.getOneTimePurchaseOfferDetails() != null) {
eventValue[AFInAppEventParameterName.REVENUE] =
skuDetails.getOneTimePurchaseOfferDetails()
?.getPriceAmountMicros()!! / 1000000f
eventValue["Price"] =
skuDetails.getOneTimePurchaseOfferDetails()
?.getFormattedPrice()!!
eventValue[AFInAppEventParameterName.CURRENCY] =
skuDetails.getOneTimePurchaseOfferDetails()
?.getPriceCurrencyCode()!!
}
AppsFlyerLib.getInstance().logEvent(
applicationContext,
AFInAppEventType.PURCHASE,
eventValue
)
}
// var skuDetails: IProductDetails? = null
// if (googleChargeBean?.getChargeProdId() == purchase.getProducts()
// .firstOrNull()
// ) {
// skuDetails = googleChargeBean?.productDetails
// }
// if (skuDetails != null) {
// val eventValue: MutableMap<String, Any> =
// HashMap()
// eventValue[AFInAppEventParameterName.CONTENT_TYPE] = "Gold"
// eventValue[AFInAppEventParameterName.QUANTITY] = 1
// eventValue[AFInAppEventParameterName.CONTENT_ID] =
// purchase.getOrderId()!!
// if (skuDetails.getOneTimePurchaseOfferDetails() != null) {
// eventValue[AFInAppEventParameterName.REVENUE] =
// skuDetails.getOneTimePurchaseOfferDetails()
// ?.getPriceAmountMicros()!! / 1000000f
// eventValue["Price"] =
// skuDetails.getOneTimePurchaseOfferDetails()
// ?.getFormattedPrice()!!
// eventValue[AFInAppEventParameterName.CURRENCY] =
// skuDetails.getOneTimePurchaseOfferDetails()
// ?.getPriceCurrencyCode()!!
// }
// AppsFlyerLib.getInstance().logEvent(
// applicationContext,
// AFInAppEventType.PURCHASE,
// eventValue
// )
// }
}
) { throwable: Throwable ->
if (throwable !is IgnoreException) {