Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app-android/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,9 @@
}
# VUNGLE - END

# PANGLE - START
-keep class com.bytedance.sdk.** { *; }
# PANGLE - END

-dontwarn android.media.LoudnessCodecController$OnLoudnessCodecUpdateListener
-dontwarn android.media.LoudnessCodecController
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ class AdsConsentManager @Inject constructor(
}
}.build()
consentInformation.requestConsentInfoUpdate(
activity, consentRequestParams,
activity,
consentRequestParams,
{
MTLog.d(this, "Consent information successfully updated.")
loadAndShowConsentFormIfRequired(activity, onConsentGatheringCompleteListener)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package org.mtransit.android.ad

import androidx.annotation.AnyThread
import androidx.annotation.WorkerThread
import com.google.ads.mediation.pangle.PangleMediationAdapter
import com.google.android.gms.ads.AdRequest
import com.google.android.gms.ads.MobileAds
import com.google.android.gms.ads.RequestConfiguration
Expand All @@ -20,6 +21,7 @@ import org.mtransit.android.dev.DemoModeManager
import java.util.concurrent.atomic.AtomicBoolean
import javax.inject.Inject
import javax.inject.Singleton
import com.bytedance.sdk.openadsdk.api.PAGConstant as PanglePAGConstant
import com.google.android.ump.FormError as UMPFormError

@Singleton
Expand Down Expand Up @@ -116,6 +118,8 @@ class GlobalAdManager(
.build()
)
}
PangleMediationAdapter.setGDPRConsent(PanglePAGConstant.PAGGDPRConsentType.PAG_GDPR_CONSENT_TYPE_CONSENT) // EU user consent policy
PangleMediationAdapter.setPAConsent(PanglePAGConstant.PAGPAConsentType.PAG_PA_CONSENT_TYPE_CONSENT) // US states privacy laws
// https://developers.google.com/admob/android/quick-start#initialize_the_mobile_ads_sdk
MobileAds.initialize(
activity.requireActivity(), // some adapters require activity
Expand Down