25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

209 satır
5.8 KiB

  1. // Copyright (C) 2015 Google, Inc.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. using System;
  15. using System.Reflection;
  16. using GoogleMobileAds.Api;
  17. using UnityEngine;
  18. namespace GoogleMobileAds.Common
  19. {
  20. public class DummyClient : IBannerClient, IInterstitialClient, IRewardBasedVideoAdClient,
  21. IAdLoaderClient, IMobileAdsClient
  22. {
  23. public DummyClient()
  24. {
  25. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  26. }
  27. // Disable warnings for unused dummy ad events.
  28. #pragma warning disable 67
  29. public event EventHandler<EventArgs> OnAdLoaded;
  30. public event EventHandler<AdFailedToLoadEventArgs> OnAdFailedToLoad;
  31. public event EventHandler<EventArgs> OnAdOpening;
  32. public event EventHandler<EventArgs> OnAdStarted;
  33. public event EventHandler<EventArgs> OnAdClosed;
  34. public event EventHandler<Reward> OnAdRewarded;
  35. public event EventHandler<EventArgs> OnAdLeavingApplication;
  36. public event EventHandler<EventArgs> OnAdCompleted;
  37. public event EventHandler<CustomNativeEventArgs> OnCustomNativeTemplateAdLoaded;
  38. #pragma warning restore 67
  39. public string UserId
  40. {
  41. get
  42. {
  43. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  44. return "UserId";
  45. }
  46. set
  47. {
  48. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  49. }
  50. }
  51. public void Initialize(string appId)
  52. {
  53. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  54. }
  55. public void SetApplicationMuted(bool muted)
  56. {
  57. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  58. }
  59. public void SetApplicationVolume(float volume)
  60. {
  61. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  62. }
  63. public void SetiOSAppPauseOnBackground(bool pause)
  64. {
  65. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  66. }
  67. public void CreateBannerView(string adUnitId, AdSize adSize, AdPosition position)
  68. {
  69. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  70. }
  71. public void CreateBannerView(string adUnitId, AdSize adSize, int positionX, int positionY)
  72. {
  73. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  74. }
  75. public void LoadAd(AdRequest request)
  76. {
  77. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  78. }
  79. public void ShowBannerView()
  80. {
  81. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  82. }
  83. public void HideBannerView()
  84. {
  85. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  86. }
  87. public void DestroyBannerView()
  88. {
  89. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  90. }
  91. public float GetHeightInPixels()
  92. {
  93. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  94. return 0;
  95. }
  96. public float GetWidthInPixels()
  97. {
  98. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  99. return 0;
  100. }
  101. public void SetPosition(AdPosition adPosition)
  102. {
  103. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  104. }
  105. public void SetPosition(int x, int y)
  106. {
  107. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  108. }
  109. public void CreateInterstitialAd(string adUnitId)
  110. {
  111. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  112. }
  113. public bool IsLoaded()
  114. {
  115. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  116. return true;
  117. }
  118. public void ShowInterstitial()
  119. {
  120. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  121. }
  122. public void DestroyInterstitial()
  123. {
  124. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  125. }
  126. public void CreateRewardBasedVideoAd()
  127. {
  128. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  129. }
  130. public void SetUserId(string userId)
  131. {
  132. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  133. }
  134. public void LoadAd(AdRequest request, string adUnitId)
  135. {
  136. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  137. }
  138. public void DestroyRewardBasedVideoAd()
  139. {
  140. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  141. }
  142. public void ShowRewardBasedVideoAd()
  143. {
  144. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  145. }
  146. public void CreateAdLoader(AdLoader.Builder builder)
  147. {
  148. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  149. }
  150. public void Load(AdRequest request)
  151. {
  152. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  153. }
  154. public void SetAdSize(AdSize adSize)
  155. {
  156. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  157. }
  158. public string MediationAdapterClassName()
  159. {
  160. Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
  161. return null;
  162. }
  163. }
  164. }