com.azerion.bluestack 3.0.3 → 3.1.0-preview2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/Editor/Android/AndroidBuildPostProcess.cs +0 -1
  2. package/Editor/Android/AndroidDependency.cs +1 -2
  3. package/Editor/Android/AndroidDependencyModifier.cs +55 -0
  4. package/Editor/Android/AndroidDependencyModifier.cs.meta +3 -0
  5. package/Editor/Android/AndroidDependencyParser.cs +26 -1
  6. package/Editor/Android/ManifestProcessor.cs +2 -1
  7. package/Editor/Azerion.BlueStack.Editor.asmdef +14 -14
  8. package/Editor/BlueStackDependencies.xml +1 -1
  9. package/Editor/BlueStackMediationDependencies.xml +11 -0
  10. package/Editor/BlueStackMediationDependencies.xml.meta +7 -0
  11. package/Editor/BlueStackSettings.cs +21 -18
  12. package/Editor/BlueStackSettingsEditor.cs +64 -1
  13. package/Editor/DebugHelper.cs +2 -2
  14. package/Editor/Dependency.cs +1 -1
  15. package/Editor/DependencyProvider.cs +213 -2
  16. package/Editor/IDependencyModifier.cs +12 -0
  17. package/Editor/IDependencyModifier.cs.meta +11 -0
  18. package/Editor/IDependencyParser.cs +1 -0
  19. package/Editor/MediationNetworkDependency.cs +34 -0
  20. package/Editor/MediationNetworkDependency.cs.meta +3 -0
  21. package/Editor/iOS/IOSDependency.cs +12 -0
  22. package/Editor/iOS/IOSDependency.cs.meta +11 -0
  23. package/Editor/iOS/IOSDependencyModifier.cs +105 -0
  24. package/Editor/iOS/IOSDependencyModifier.cs.meta +3 -0
  25. package/Editor/iOS/IOSDependencyParser.cs +32 -0
  26. package/Editor/iOS/PodDependency/PodDependencyUtils.cs +5 -1
  27. package/Example/Azerion.BlueStack.Example.asmdef +14 -14
  28. package/Example/Scripts/NativeAdManager.cs +5 -7
  29. package/Example/Scripts/SmallNativeAdManager.cs +4 -6
  30. package/README.md +4 -1
  31. package/Runtime/API/AdSize.cs +2 -2
  32. package/Runtime/API/Banner/BannerAd.cs +1 -1
  33. package/Runtime/API/BlueStackAds.cs +7 -3
  34. package/Runtime/API/InterstitialAd.cs +20 -5
  35. package/Runtime/API/NativeAd/NativeAd.cs +20 -26
  36. package/Runtime/API/NativeAd/NativeAdEventArgs.cs +1 -5
  37. package/Runtime/API/NativeAd/NativeAdInteractionHandler.cs +176 -173
  38. package/Runtime/API/NativeAd/NativeAdLoader.cs +10 -14
  39. package/Runtime/API/NativeAd/NativeAdObject.cs +563 -547
  40. package/Runtime/API/NativeAd/NativeAdType.cs +6 -6
  41. package/Runtime/API/NativeAd/NativeAssetInfo.cs +28 -28
  42. package/Runtime/Azerion.BlueStack.asmdef +14 -14
  43. package/Runtime/Common/NativeAd/AdLoaderClientArgs.cs +8 -8
  44. package/Runtime/Common/NativeAd/AdsEventExecutor.cs +69 -68
  45. package/Runtime/Common/NativeAd/DummyNativeClient.cs +52 -52
  46. package/Runtime/Common/NativeAd/NativeClientEventArgs.cs +5 -5
  47. package/Runtime/Common/NativeAd/NativeUtils.cs +111 -107
  48. package/Runtime/Internal/IBannerAdClient.cs +1 -1
  49. package/Runtime/Internal/IBlueStackClient.cs +2 -1
  50. package/Runtime/Internal/NativeAd/IAdLoaderClient.cs +12 -12
  51. package/Runtime/Internal/NativeAd/INativeAdClient.cs +1 -1
  52. package/Runtime/Internal/NativeAd/INativeClientFactory.cs +5 -5
  53. package/Runtime/Platforms/Android/BlueStackClient.cs +2 -1
  54. package/Runtime/Platforms/Android/BlueStackNativeClassNames.cs +2 -1
  55. package/Runtime/Platforms/Unity/AdvertisementManager.cs +5 -4
  56. package/Runtime/Platforms/Unity/BannerAdClient.cs +16 -9
  57. package/Runtime/Platforms/Unity/BaseAdClient.cs +7 -5
  58. package/Runtime/Platforms/Unity/BlueStackClient.cs +4 -3
  59. package/Runtime/Platforms/Unity/ClientsFactory.cs +0 -1
  60. package/Runtime/Platforms/Unity/InitializationStatusClient.cs +1 -0
  61. package/Runtime/Platforms/Unity/InterstitialAdClient.cs +12 -6
  62. package/Runtime/Platforms/Unity/NativeAdClient.cs +16 -10
  63. package/Runtime/Platforms/Unity/RewardedVideoAdClient.cs +9 -3
  64. package/Runtime/Platforms/Unity/Utils.cs +7 -3
  65. package/Runtime/Platforms/iOS/BannerAdClient.cs +33 -24
  66. package/Runtime/Platforms/iOS/BlueStackClient.cs +14 -10
  67. package/Runtime/Platforms/iOS/ClientsFactory.cs +0 -2
  68. package/Runtime/Platforms/iOS/Externs.cs +72 -65
  69. package/Runtime/Platforms/iOS/InitializationStatusClient.cs +6 -5
  70. package/Runtime/Platforms/iOS/InterstitialAdClient.cs +27 -21
  71. package/Runtime/Platforms/iOS/NativeAdClient.cs +27 -22
  72. package/Runtime/Platforms/iOS/PreferenceClient.cs +1 -1
  73. package/Runtime/Platforms/iOS/RewardedVideoAdClient.cs +27 -20
  74. package/Runtime/Platforms/iOS/Utils.cs +6 -3
  75. package/Runtime/Utilities/MiniJSON.cs +12 -12
  76. package/package.json +1 -1
  77. package/Editor/iOS/Dependency.cs +0 -0
  78. package/Editor/iOS/Dependency.cs.meta +0 -3
@@ -5,7 +5,7 @@ using Azerion.BlueStack.Internal;
5
5
 
6
6
  namespace Azerion.BlueStack.Platforms.iOS
7
7
  {
8
- public class PreferenceClient: IPreferenceClient, IDisposable
8
+ public class PreferenceClient : IPreferenceClient, IDisposable
9
9
  {
10
10
  private IntPtr _preferencePtr;
11
11
 
@@ -7,22 +7,27 @@ using Azerion.BlueStack.Internal;
7
7
 
8
8
  namespace Azerion.BlueStack.Platforms.iOS
9
9
  {
10
- public class RewardedVideoAdClient: IRewardedVideoAdClient, IDisposable
10
+ public class RewardedVideoAdClient : IRewardedVideoAdClient, IDisposable
11
11
  {
12
12
  private IntPtr _rewardedClientPtr;
13
13
  private IntPtr _rewardedPtr;
14
-
15
- #region rewarded ad callback types
14
+
15
+ #region rewarded ad callback types
16
16
 
17
17
  internal delegate void BSUOnRewardedVideoLoadedCallback(IntPtr rewardedClient);
18
+
18
19
  internal delegate void BSUOnRewardedVideoErrorCallback(IntPtr rewardedClient, IntPtr error);
20
+
19
21
  internal delegate void BSUOnRewardedVideoClickedCallback(IntPtr rewardedClient);
22
+
20
23
  internal delegate void BSUOnRewardedVideoClosedCallback(IntPtr rewardedClient);
24
+
21
25
  internal delegate void BSUOnRewardedVideoAppearedCallback(IntPtr rewardedClient);
26
+
22
27
  internal delegate void BSUOnUserRewardEarnedCallback(IntPtr rewardedClient, int rewardAmount);
23
28
 
24
- #endregion
25
-
29
+ #endregion
30
+
26
31
  // This property should be used when setting the rewardedPtr.
27
32
  private IntPtr RewardedPtr
28
33
  {
@@ -33,13 +38,14 @@ namespace Azerion.BlueStack.Platforms.iOS
33
38
  this._rewardedPtr = value;
34
39
  }
35
40
  }
36
-
41
+
37
42
  public event EventHandler<EventArgs> OnRewardedVideoLoaded;
38
43
  public event EventHandler<BlueStackError> OnRewardedVideoError;
39
44
  public event EventHandler<EventArgs> OnRewardedVideoClicked;
40
45
  public event EventHandler<EventArgs> OnRewardedVideoClosed;
41
46
  public event EventHandler<EventArgs> OnRewardedVideoAppeared;
42
47
  public event EventHandler<RewardedItem> OnUserRewardEarned;
48
+
43
49
  public void Create(string placementId)
44
50
  {
45
51
  this._rewardedClientPtr = (IntPtr)GCHandle.Alloc(this);
@@ -75,7 +81,7 @@ namespace Azerion.BlueStack.Platforms.iOS
75
81
  Externs.BSUDestroyRewardedVideoAd(this.RewardedPtr);
76
82
  DestroyRewarded();
77
83
  }
78
-
84
+
79
85
  // Destroys the rewarded video ad.
80
86
  private void DestroyRewarded()
81
87
  {
@@ -92,8 +98,8 @@ namespace Azerion.BlueStack.Platforms.iOS
92
98
  {
93
99
  this.Dispose();
94
100
  }
95
-
96
- #region rewarded video ad callback methods
101
+
102
+ #region rewarded video ad callback methods
97
103
 
98
104
  [AOT.MonoPInvokeCallback(typeof(BSUOnRewardedVideoLoadedCallback))]
99
105
  private static void OnRewardedVideoLoadedCallback(IntPtr rewardedClient)
@@ -101,46 +107,47 @@ namespace Azerion.BlueStack.Platforms.iOS
101
107
  RewardedVideoAdClient client = IntPtrToRewardedVideoAdClient(rewardedClient);
102
108
  if (client.OnRewardedVideoLoaded != null)
103
109
  {
104
- client.OnRewardedVideoLoaded(client,EventArgs.Empty);
110
+ client.OnRewardedVideoLoaded(client, EventArgs.Empty);
105
111
  }
106
112
  }
107
113
 
108
114
  [AOT.MonoPInvokeCallback(typeof(BSUOnRewardedVideoErrorCallback))]
109
- private static void OnRewardedVideoErrorCallback(IntPtr rewardedClient, IntPtr error) {
115
+ private static void OnRewardedVideoErrorCallback(IntPtr rewardedClient, IntPtr error)
116
+ {
110
117
  RewardedVideoAdClient client = IntPtrToRewardedVideoAdClient(rewardedClient);
111
118
  if (client.OnRewardedVideoError != null)
112
119
  {
113
120
  client.OnRewardedVideoError(client, BlueStackErrorUtils.CreateFromIntPtr(error));
114
121
  }
115
122
  }
116
-
123
+
117
124
  [AOT.MonoPInvokeCallback(typeof(BSUOnRewardedVideoClickedCallback))]
118
125
  private static void OnRewardedVideoClickedCallback(IntPtr rewardedClient)
119
126
  {
120
127
  RewardedVideoAdClient client = IntPtrToRewardedVideoAdClient(rewardedClient);
121
128
  if (client.OnRewardedVideoClicked != null)
122
129
  {
123
- client.OnRewardedVideoClicked(client,EventArgs.Empty);
130
+ client.OnRewardedVideoClicked(client, EventArgs.Empty);
124
131
  }
125
132
  }
126
-
133
+
127
134
  [AOT.MonoPInvokeCallback(typeof(BSUOnRewardedVideoClosedCallback))]
128
135
  private static void OnRewardedVideoClosedCallback(IntPtr rewardedClient)
129
136
  {
130
137
  RewardedVideoAdClient client = IntPtrToRewardedVideoAdClient(rewardedClient);
131
138
  if (client.OnRewardedVideoClosed != null)
132
139
  {
133
- client.OnRewardedVideoClosed(client,EventArgs.Empty);
140
+ client.OnRewardedVideoClosed(client, EventArgs.Empty);
134
141
  }
135
142
  }
136
-
143
+
137
144
  [AOT.MonoPInvokeCallback(typeof(BSUOnRewardedVideoAppearedCallback))]
138
145
  private static void OnRewardedVideoAppearedCallback(IntPtr rewardedClient)
139
146
  {
140
147
  RewardedVideoAdClient client = IntPtrToRewardedVideoAdClient(rewardedClient);
141
148
  if (client.OnRewardedVideoAppeared != null)
142
149
  {
143
- client.OnRewardedVideoAppeared(client,EventArgs.Empty);
150
+ client.OnRewardedVideoAppeared(client, EventArgs.Empty);
144
151
  }
145
152
  }
146
153
 
@@ -151,7 +158,7 @@ namespace Azerion.BlueStack.Platforms.iOS
151
158
  if (client.OnUserRewardEarned != null)
152
159
  {
153
160
  RewardedItem rewardArg = new RewardedItem(rewardAmount);
154
- client.OnUserRewardEarned(client,e:rewardArg);
161
+ client.OnUserRewardEarned(client, e: rewardArg);
155
162
  }
156
163
  }
157
164
 
@@ -161,8 +168,8 @@ namespace Azerion.BlueStack.Platforms.iOS
161
168
  GCHandle handle = (GCHandle)rewardedClient;
162
169
  return handle.Target as RewardedVideoAdClient;
163
170
  }
164
-
165
- #endregion
171
+
172
+ #endregion
166
173
  }
167
174
  }
168
175
  #endif
@@ -11,16 +11,19 @@ namespace Azerion.BlueStack.Platforms.iOS
11
11
  public static IntPtr BuildSettings(Settings settings)
12
12
  {
13
13
  IntPtr settingsPtr = Externs.BSUCreateSettings();
14
- Externs.BSUSetDebugModeEnabled(settingsPtr,settings.IsDebugModeEnabled);
14
+ Externs.BSUSetDebugModeEnabled(settingsPtr, settings.IsDebugModeEnabled);
15
15
  return settingsPtr;
16
16
  }
17
17
 
18
- public static string PtrToString(IntPtr stringPtr) {
18
+ public static string PtrToString(IntPtr stringPtr)
19
+ {
19
20
  string managedString = Marshal.PtrToStringAnsi(stringPtr);
20
21
  Marshal.FreeHGlobal(stringPtr);
21
22
  return managedString;
22
23
  }
23
- public static List<string> PtrArrayToManagedList(IntPtr arrayPtr, int numOfAssets) {
24
+
25
+ public static List<string> PtrArrayToManagedList(IntPtr arrayPtr, int numOfAssets)
26
+ {
24
27
  IntPtr[] intPtrArray = new IntPtr[numOfAssets];
25
28
  string[] managedAssetArray = new string[numOfAssets];
26
29
  Marshal.Copy(arrayPtr, intPtrArray, 0, numOfAssets);
@@ -124,6 +124,7 @@ namespace Azerion.BlueStack.MiniJSON
124
124
  {
125
125
  return null;
126
126
  }
127
+
127
128
  // ditch the colon
128
129
  json.Read();
129
130
 
@@ -260,6 +261,7 @@ namespace Azerion.BlueStack.MiniJSON
260
261
  s.Append((char)Convert.ToInt32(new string(hex), 16));
261
262
  break;
262
263
  }
264
+
263
265
  break;
264
266
  default:
265
267
  s.Append(c);
@@ -277,12 +279,14 @@ namespace Azerion.BlueStack.MiniJSON
277
279
  if (number.IndexOf('.') == -1)
278
280
  {
279
281
  long parsedInt;
280
- long.TryParse(number, System.Globalization.NumberStyles.Any, System.Globalization.CultureInfo.InvariantCulture, out parsedInt);
282
+ long.TryParse(number, System.Globalization.NumberStyles.Any,
283
+ System.Globalization.CultureInfo.InvariantCulture, out parsedInt);
281
284
  return parsedInt;
282
285
  }
283
286
 
284
287
  double parsedDouble;
285
- double.TryParse(number, System.Globalization.NumberStyles.Any, System.Globalization.CultureInfo.InvariantCulture, out parsedDouble);
288
+ double.TryParse(number, System.Globalization.NumberStyles.Any,
289
+ System.Globalization.CultureInfo.InvariantCulture, out parsedDouble);
286
290
  return parsedDouble;
287
291
  }
288
292
 
@@ -301,18 +305,12 @@ namespace Azerion.BlueStack.MiniJSON
301
305
 
302
306
  char PeekChar
303
307
  {
304
- get
305
- {
306
- return Convert.ToChar(json.Peek());
307
- }
308
+ get { return Convert.ToChar(json.Peek()); }
308
309
  }
309
310
 
310
311
  char NextChar
311
312
  {
312
- get
313
- {
314
- return Convert.ToChar(json.Read());
315
- }
313
+ get { return Convert.ToChar(json.Read()); }
316
314
  }
317
315
 
318
316
  string NextWord
@@ -539,6 +537,7 @@ namespace Azerion.BlueStack.MiniJSON
539
537
  builder.Append("\\u");
540
538
  builder.Append(codepoint.ToString("x4"));
541
539
  }
540
+
542
541
  break;
543
542
  }
544
543
  }
@@ -569,7 +568,8 @@ namespace Azerion.BlueStack.MiniJSON
569
568
  else if (value is double
570
569
  || value is decimal)
571
570
  {
572
- builder.Append(Convert.ToDouble(value).ToString("R", System.Globalization.CultureInfo.InvariantCulture));
571
+ builder.Append(Convert.ToDouble(value)
572
+ .ToString("R", System.Globalization.CultureInfo.InvariantCulture));
573
573
  }
574
574
  else
575
575
  {
@@ -578,4 +578,4 @@ namespace Azerion.BlueStack.MiniJSON
578
578
  }
579
579
  }
580
580
  }
581
- }
581
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.azerion.bluestack",
3
- "version": "3.0.3",
3
+ "version": "3.1.0-preview2",
4
4
  "displayName": "BlueStack",
5
5
  "description": "BlueStack SDK has been designed to give developers options for showing Ads from different ad networks.",
6
6
  "unity": "2020.3",
File without changes
@@ -1,3 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 138003a368094483afc6c80d227d6002
3
- timeCreated: 1671613477