// Token: 0x06000049 RID: 73 RVA: 0x00003A2A File Offset: 0x00001E2A
 public static void chartBoostShouldDisplayMoreAppsCallbackResult(bool result)
 {
     if (!CBExternal.checkInitialized())
     {
         return;
     }
     CBExternal._plugin.Call("chartBoostShouldDisplayMoreAppsCallbackResult", new object[]
     {
         result
     });
     CBExternal.Log("Android : chartBoostShouldDisplayMoreAppsCallbackResult");
 }
        // Token: 0x06000100 RID: 256 RVA: 0x00006148 File Offset: 0x00004548
        private void shouldDisplayInterstitialEvent(string location)
        {
            bool flag = true;

            if (Chartboost.shouldDisplayInterstitial != null)
            {
                flag = Chartboost.shouldDisplayInterstitial(CBLocation.locationFromName(location));
            }
            CBExternal.chartBoostShouldDisplayInterstitialCallbackResult(flag);
            if (flag)
            {
                Chartboost.showInterstitial(CBLocation.locationFromName(location));
            }
        }
        // Token: 0x06000107 RID: 263 RVA: 0x0000628C File Offset: 0x0000468C
        private void shouldDisplayMoreAppsEvent(string location)
        {
            bool flag = true;

            if (Chartboost.shouldDisplayMoreApps != null)
            {
                flag = Chartboost.shouldDisplayMoreApps(CBLocation.locationFromName(location));
            }
            CBExternal.chartBoostShouldDisplayMoreAppsCallbackResult(flag);
            if (flag)
            {
                Chartboost.showMoreApps(CBLocation.locationFromName(location));
            }
        }
 // Token: 0x0600005A RID: 90 RVA: 0x00003D58 File Offset: 0x00002158
 public static void trackInAppAmazonStorePurchaseEvent(string title, string description, string price, string currency, string productID, string userID, string purchaseToken)
 {
     CBExternal.Log("Android: trackInAppAmazonStorePurchaseEvent");
     CBExternal._plugin.Call("trackInAppAmazonStorePurchaseEvent", new object[]
     {
         title,
         description,
         price,
         currency,
         productID,
         userID,
         purchaseToken
     });
 }
 // Token: 0x06000059 RID: 89 RVA: 0x00003D18 File Offset: 0x00002118
 public static void trackInAppGooglePlayPurchaseEvent(string title, string description, string price, string currency, string productID, string purchaseData, string purchaseSignature)
 {
     CBExternal.Log("Android: trackInAppGooglePlayPurchaseEvent");
     CBExternal._plugin.Call("trackInAppGooglePlayPurchaseEvent", new object[]
     {
         title,
         description,
         price,
         currency,
         productID,
         purchaseData,
         purchaseSignature
     });
 }
Пример #6
0
        private void shouldDisplayMoreAppsEvent(string location)
        {
            bool shouldDisplayMoreAppsResponse = true;

            if (shouldDisplayMoreApps != null)
            {
                shouldDisplayMoreAppsResponse = shouldDisplayMoreApps(CBLocation.locationFromName(location));
            }
            CBExternal.chartBoostShouldDisplayMoreAppsCallbackResult(shouldDisplayMoreAppsResponse);
            if (shouldDisplayMoreAppsResponse)
            {
                Chartboost.showMoreApps(CBLocation.locationFromName(location));
            }
        }
Пример #7
0
        private void shouldDisplayInterstitialEvent(string location)
        {
            bool shouldDisplayInterstitialResponse = true;

            if (shouldDisplayInterstitial != null)
            {
                shouldDisplayInterstitialResponse = shouldDisplayInterstitial(CBLocation.locationFromName(location));
            }
            CBExternal.chartBoostShouldDisplayInterstitialCallbackResult(shouldDisplayInterstitialResponse);
            if (shouldDisplayInterstitialResponse)
            {
                Chartboost.showInterstitial(CBLocation.locationFromName(location));
            }
        }
        // Token: 0x0600010F RID: 271 RVA: 0x00006420 File Offset: 0x00004820
        private void shouldDisplayRewardedVideoEvent(string location)
        {
            bool flag = true;

            if (Chartboost.shouldDisplayRewardedVideo != null)
            {
                flag = Chartboost.shouldDisplayRewardedVideo(CBLocation.locationFromName(location));
            }
            CBExternal.chartBoostShouldDisplayRewardedVideoCallbackResult(flag);
            if (flag)
            {
                Chartboost.showRewardedVideo(CBLocation.locationFromName(location));
            }
        }
 // Token: 0x060000F3 RID: 243 RVA: 0x00005ECC File Offset: 0x000042CC
 private void Awake()
 {
     if (Chartboost.instance == null)
     {
         Chartboost.instance = this;
         CBExternal.init();
         CBExternal.setGameObjectName(base.gameObject.name);
         UnityEngine.Object.DontDestroyOnLoad(base.gameObject);
         Chartboost.showingAgeGate = false;
     }
     else
     {
         UnityEngine.Object.Destroy(base.gameObject);
     }
 }
Пример #10
0
        private void shouldDisplayRewardedVideoEvent(string location)
        {
            bool shouldDisplayRewardedVideoResponse = true;

            if (shouldDisplayRewardedVideo != null)
            {
                shouldDisplayRewardedVideoResponse = shouldDisplayRewardedVideo(CBLocation.locationFromName(location));
            }

            CBExternal.chartBoostShouldDisplayRewardedVideoCallbackResult(shouldDisplayRewardedVideoResponse);
            if (shouldDisplayRewardedVideoResponse)
            {
                Chartboost.showRewardedVideo(CBLocation.locationFromName(location));
            }
        }
Пример #11
0
 void Update()
 {
                 #if UNITY_ANDROID
     // Handle the Android back button (only if impressions are set to not use activities)
     if (Input.GetKeyUp(KeyCode.Escape))
     {
         // Check if Chartboost wants to respond to it
         if (CBExternal.onBackPressed())
         {
             // If so, return and ignore it
             return;
         }
     }
                 #endif
 }
 // Token: 0x0600003C RID: 60 RVA: 0x0000358C File Offset: 0x0000198C
 public static bool hasInterstitial(CBLocation location)
 {
     if (!CBExternal.checkInitialized())
     {
         return(false);
     }
     if (location == null)
     {
         Debug.LogError("Chartboost SDK: location passed is null cannot perform the operation requested");
         return(false);
     }
     CBExternal.Log("Android : hasInterstitial at location = " + location.ToString());
     return(CBExternal._plugin.Call <bool>("hasInterstitial", new object[]
     {
         location.ToString()
     }));
 }
 // Token: 0x06000054 RID: 84 RVA: 0x00003BEC File Offset: 0x00001FEC
 public static void trackLevelInfo(string eventLabel, CBLevelType type, int mainLevel, string description)
 {
     CBExternal._plugin.Call("trackLevelInfo", new object[]
     {
         eventLabel,
         (int)type,
         mainLevel,
         description
     });
     CBExternal.Log(string.Format("Android : PIA Level Tracking:\n\teventLabel = {0}\n\ttype = {1}\n\tmainLevel = {2}\n\tdescription = {3}", new object[]
     {
         eventLabel,
         (int)type,
         mainLevel,
         description
     }));
 }
        // Token: 0x06000039 RID: 57 RVA: 0x00003454 File Offset: 0x00001854
        public static void initWithAppId(string appId, string appSignature)
        {
            string unityVersion = Application.unityVersion;

            CBExternal.Log("Unity : initWithAppId " + appId + " and version " + unityVersion);
            using (AndroidJavaClass androidJavaClass = new AndroidJavaClass("com.chartboost.sdk.unity.CBPlugin"))
            {
                CBExternal._plugin = androidJavaClass.CallStatic <AndroidJavaObject>("instance", new object[0]);
            }
            CBExternal._plugin.Call("init", new object[]
            {
                appId,
                appSignature,
                unityVersion
            });
            CBExternal.initialized = true;
        }
 // Token: 0x06000046 RID: 70 RVA: 0x00003964 File Offset: 0x00001D64
 public static void showRewardedVideo(CBLocation location)
 {
     if (!CBExternal.checkInitialized())
     {
         return;
     }
     if (location == null)
     {
         Debug.LogError("Chartboost SDK: location passed is null cannot perform the operation requested");
         return;
     }
     CBExternal._plugin.Call("showRewardedVideo", new object[]
     {
         location.ToString()
     });
     CBExternal.Log("Android : showRewardedVideo at location = " + location.ToString());
 }
Пример #16
0
 void Update()
 {
                 #if UNITY_ANDROID
     // Handle the Android back button (only if impressions are set to not use activities)
     if (Input.GetKeyUp(KeyCode.Escape))
     {
         // Check if Chartboost wants to respond to it
         if (CBExternal.onBackPressed())
         {
             // If so, return and ignore it
             return;
         }
         else
         {
             // Otherwise, handle it ourselves -- let's close the app
             Application.Quit();
         }
     }
                 #endif
 }
 // Token: 0x060000E6 RID: 230 RVA: 0x00005DFF File Offset: 0x000041FF
 public static void setCustomId(string customId)
 {
     CBExternal.setCustomId(customId);
 }
 // Token: 0x060000E2 RID: 226 RVA: 0x00005DD6 File Offset: 0x000041D6
 public static CBInPlay getInPlay(CBLocation location)
 {
     return(CBExternal.getInPlay(location));
 }
 // Token: 0x060000E1 RID: 225 RVA: 0x00005DCE File Offset: 0x000041CE
 public static bool hasInPlay(CBLocation location)
 {
     return(CBExternal.hasInPlay(location));
 }
 // Token: 0x060000E5 RID: 229 RVA: 0x00005DF8 File Offset: 0x000041F8
 public static string getCustomId()
 {
     return(CBExternal.getCustomId());
 }
 // Token: 0x060000F6 RID: 246 RVA: 0x00005F5B File Offset: 0x0000435B
 private void OnApplicationPause(bool paused)
 {
     CBExternal.pause(paused);
 }
 // Token: 0x060000EF RID: 239 RVA: 0x00005E57 File Offset: 0x00004257
 public static void trackInAppAmazonStorePurchaseEvent(string title, string description, string price, string currency, string productID, string userID, string purchaseToken)
 {
     CBExternal.trackInAppAmazonStorePurchaseEvent(title, description, price, currency, productID, userID, purchaseToken);
 }
 // Token: 0x060000F0 RID: 240 RVA: 0x00005E68 File Offset: 0x00004268
 public static void setMediation(CBMediation mediator, string version)
 {
     CBExternal.setMediation(mediator, version);
 }
 // Token: 0x060000ED RID: 237 RVA: 0x00005E3B File Offset: 0x0000423B
 public static void trackLevelInfo(string eventLabel, CBLevelType type, int mainLevel, string description)
 {
     CBExternal.trackLevelInfo(eventLabel, type, mainLevel, description);
 }
 // Token: 0x060000EE RID: 238 RVA: 0x00005E46 File Offset: 0x00004246
 public static void trackInAppGooglePlayPurchaseEvent(string title, string description, string price, string currency, string productID, string purchaseData, string purchaseSignature)
 {
     CBExternal.trackInAppGooglePlayPurchaseEvent(title, description, price, currency, productID, purchaseData, purchaseSignature);
 }
 // Token: 0x060000EB RID: 235 RVA: 0x00005E26 File Offset: 0x00004226
 public static void setShouldPrefetchVideoContent(bool shouldPrefetch)
 {
     CBExternal.setShouldPrefetchVideoContent(shouldPrefetch);
 }
 // Token: 0x060000EA RID: 234 RVA: 0x00005E1E File Offset: 0x0000421E
 public static void setShouldDisplayLoadingViewForMoreApps(bool shouldDisplay)
 {
     CBExternal.setShouldDisplayLoadingViewForMoreApps(shouldDisplay);
 }
 // Token: 0x060000E9 RID: 233 RVA: 0x00005E16 File Offset: 0x00004216
 public static void setShouldRequestInterstitialsInFirstSession(bool shouldRequest)
 {
     CBExternal.setShouldRequestInterstitialsInFirstSession(shouldRequest);
 }
 // Token: 0x060000E8 RID: 232 RVA: 0x00005E0E File Offset: 0x0000420E
 public static void setAutoCacheAds(bool autoCacheAds)
 {
     CBExternal.setAutoCacheAds(autoCacheAds);
 }
 // Token: 0x060000E7 RID: 231 RVA: 0x00005E07 File Offset: 0x00004207
 public static bool getAutoCacheAds()
 {
     return(CBExternal.getAutoCacheAds());
 }