Parcourir la source

Add RewardedAdManager

GameJob il y a 4 ans
Parent
commit
47df0b0003
1 fichiers modifiés avec 22 ajouts et 0 suppressions
  1. 22 0
      src/main/java/com/kdanmobile/admanager/RewardedAdManager.kt

+ 22 - 0
src/main/java/com/kdanmobile/admanager/RewardedAdManager.kt

@@ -0,0 +1,22 @@
+package com.kdanmobile.admanager
+
+import android.app.Activity
+import android.content.Context
+
+interface RewardedAdManager {
+    var isPersonalized: Boolean
+    fun request(activity: Activity, adUnitId: String)
+    /**
+     * Use to re-request with same activity, must be called after request(activity, adUnitId)
+     */
+    fun request(adUnitId: String)
+    fun show(adUnitId: String): Boolean
+    fun registerListener(listener: RewardedAdListener)
+    fun unregisterListener(listener: RewardedAdListener)
+    fun isLoading(adUnitId: String): Boolean
+    fun isLoaded(adUnitId: String): Boolean
+
+    fun pauseAll(context: Context)
+    fun resumeAll(context: Context)
+    fun destroyAll(context: Context)
+}