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.
- package/Editor/Android/AndroidBuildPostProcess.cs +0 -1
- package/Editor/Android/AndroidDependency.cs +1 -2
- package/Editor/Android/AndroidDependencyModifier.cs +55 -0
- package/Editor/Android/AndroidDependencyModifier.cs.meta +3 -0
- package/Editor/Android/AndroidDependencyParser.cs +26 -1
- package/Editor/Android/ManifestProcessor.cs +2 -1
- package/Editor/Azerion.BlueStack.Editor.asmdef +14 -14
- package/Editor/BlueStackDependencies.xml +1 -1
- package/Editor/BlueStackMediationDependencies.xml +11 -0
- package/Editor/BlueStackMediationDependencies.xml.meta +7 -0
- package/Editor/BlueStackSettings.cs +21 -18
- package/Editor/BlueStackSettingsEditor.cs +64 -1
- package/Editor/DebugHelper.cs +2 -2
- package/Editor/Dependency.cs +1 -1
- package/Editor/DependencyProvider.cs +213 -2
- package/Editor/IDependencyModifier.cs +12 -0
- package/Editor/IDependencyModifier.cs.meta +11 -0
- package/Editor/IDependencyParser.cs +1 -0
- package/Editor/MediationNetworkDependency.cs +34 -0
- package/Editor/MediationNetworkDependency.cs.meta +3 -0
- package/Editor/iOS/IOSDependency.cs +12 -0
- package/Editor/iOS/IOSDependency.cs.meta +11 -0
- package/Editor/iOS/IOSDependencyModifier.cs +105 -0
- package/Editor/iOS/IOSDependencyModifier.cs.meta +3 -0
- package/Editor/iOS/IOSDependencyParser.cs +32 -0
- package/Editor/iOS/PodDependency/PodDependencyUtils.cs +5 -1
- package/Example/Azerion.BlueStack.Example.asmdef +14 -14
- package/Example/Scripts/NativeAdManager.cs +5 -7
- package/Example/Scripts/SmallNativeAdManager.cs +4 -6
- package/README.md +4 -1
- package/Runtime/API/AdSize.cs +2 -2
- package/Runtime/API/Banner/BannerAd.cs +1 -1
- package/Runtime/API/BlueStackAds.cs +7 -3
- package/Runtime/API/InterstitialAd.cs +20 -5
- package/Runtime/API/NativeAd/NativeAd.cs +20 -26
- package/Runtime/API/NativeAd/NativeAdEventArgs.cs +1 -5
- package/Runtime/API/NativeAd/NativeAdInteractionHandler.cs +176 -173
- package/Runtime/API/NativeAd/NativeAdLoader.cs +10 -14
- package/Runtime/API/NativeAd/NativeAdObject.cs +563 -547
- package/Runtime/API/NativeAd/NativeAdType.cs +6 -6
- package/Runtime/API/NativeAd/NativeAssetInfo.cs +28 -28
- package/Runtime/Azerion.BlueStack.asmdef +14 -14
- package/Runtime/Common/NativeAd/AdLoaderClientArgs.cs +8 -8
- package/Runtime/Common/NativeAd/AdsEventExecutor.cs +69 -68
- package/Runtime/Common/NativeAd/DummyNativeClient.cs +52 -52
- package/Runtime/Common/NativeAd/NativeClientEventArgs.cs +5 -5
- package/Runtime/Common/NativeAd/NativeUtils.cs +111 -107
- package/Runtime/Internal/IBannerAdClient.cs +1 -1
- package/Runtime/Internal/IBlueStackClient.cs +2 -1
- package/Runtime/Internal/NativeAd/IAdLoaderClient.cs +12 -12
- package/Runtime/Internal/NativeAd/INativeAdClient.cs +1 -1
- package/Runtime/Internal/NativeAd/INativeClientFactory.cs +5 -5
- package/Runtime/Platforms/Android/BlueStackClient.cs +2 -1
- package/Runtime/Platforms/Android/BlueStackNativeClassNames.cs +2 -1
- package/Runtime/Platforms/Unity/AdvertisementManager.cs +5 -4
- package/Runtime/Platforms/Unity/BannerAdClient.cs +16 -9
- package/Runtime/Platforms/Unity/BaseAdClient.cs +7 -5
- package/Runtime/Platforms/Unity/BlueStackClient.cs +4 -3
- package/Runtime/Platforms/Unity/ClientsFactory.cs +0 -1
- package/Runtime/Platforms/Unity/InitializationStatusClient.cs +1 -0
- package/Runtime/Platforms/Unity/InterstitialAdClient.cs +12 -6
- package/Runtime/Platforms/Unity/NativeAdClient.cs +16 -10
- package/Runtime/Platforms/Unity/RewardedVideoAdClient.cs +9 -3
- package/Runtime/Platforms/Unity/Utils.cs +7 -3
- package/Runtime/Platforms/iOS/BannerAdClient.cs +33 -24
- package/Runtime/Platforms/iOS/BlueStackClient.cs +14 -10
- package/Runtime/Platforms/iOS/ClientsFactory.cs +0 -2
- package/Runtime/Platforms/iOS/Externs.cs +72 -65
- package/Runtime/Platforms/iOS/InitializationStatusClient.cs +6 -5
- package/Runtime/Platforms/iOS/InterstitialAdClient.cs +27 -21
- package/Runtime/Platforms/iOS/NativeAdClient.cs +27 -22
- package/Runtime/Platforms/iOS/PreferenceClient.cs +1 -1
- package/Runtime/Platforms/iOS/RewardedVideoAdClient.cs +27 -20
- package/Runtime/Platforms/iOS/Utils.cs +6 -3
- package/Runtime/Utilities/MiniJSON.cs +12 -12
- package/package.json +1 -1
- package/Editor/iOS/Dependency.cs +0 -0
- package/Editor/iOS/Dependency.cs.meta +0 -3
|
@@ -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
|
-
|
|
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,
|
|
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,
|
|
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)
|
|
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
package/Editor/iOS/Dependency.cs
DELETED
|
File without changes
|