com.amanotes.gdk 0.2.45-1 → 0.2.45-2
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/CHANGELOG.md +3 -0
- package/Runtime/AmaGDK.UserProfile.cs +29 -26
- package/Runtime/AmaGDK.cs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -242,35 +242,38 @@ namespace Amanotes.Core
|
|
|
242
242
|
{
|
|
243
243
|
AdvertisingIdFetcher.RequestAdvertisingId(advertisingId =>
|
|
244
244
|
{
|
|
245
|
-
|
|
246
|
-
switch (Application.platform)
|
|
245
|
+
GDKUtils.DelayCall(0f, () =>
|
|
247
246
|
{
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
v =
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
247
|
+
SetAdvertisingID(advertisingId);
|
|
248
|
+
switch (Application.platform)
|
|
249
|
+
{
|
|
250
|
+
case RuntimePlatform.IPhonePlayer:
|
|
251
|
+
string v = KeyChain.GetKeyChain(AMA_DEVICE_ID_KEY);
|
|
252
|
+
if (string.IsNullOrEmpty(v))
|
|
253
|
+
{
|
|
254
|
+
v = Guid.NewGuid().ToString();
|
|
255
|
+
KeyChain.SetKeyChain(AMA_DEVICE_ID_KEY, v);
|
|
256
|
+
}
|
|
257
|
+
AmaDeviceId = v;
|
|
258
|
+
break;
|
|
257
259
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
260
|
+
case RuntimePlatform.Android:
|
|
261
|
+
string cachedAmaDeviceId = PlayerPrefs.GetString(AMA_DEVICE_ID_KEY);
|
|
262
|
+
if (string.IsNullOrEmpty(cachedAmaDeviceId))
|
|
263
|
+
{
|
|
264
|
+
cachedAmaDeviceId = SystemInfo.deviceUniqueIdentifier;
|
|
265
|
+
PlayerPrefs.SetString(AMA_DEVICE_ID_KEY, cachedAmaDeviceId);
|
|
266
|
+
}
|
|
267
|
+
AmaDeviceId = cachedAmaDeviceId;
|
|
268
|
+
break;
|
|
267
269
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
270
|
+
default:
|
|
271
|
+
AmaDeviceId = SystemInfo.deviceUniqueIdentifier;
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
Logging.Log($"Generate AmaDeviceId completed: {_amaDeviceId}");
|
|
275
|
+
User.Save();
|
|
276
|
+
});
|
|
274
277
|
});
|
|
275
278
|
}
|
|
276
279
|
|
package/Runtime/AmaGDK.cs
CHANGED