app center;增加發送ping的秒
This commit is contained in:
1 parent
1bd1ffdb5a
commit
d754ff3b15
719 files changed
+34172
-2875
No files matched your search
@@ -0,0 +1,41 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#if UNITY_ANDROID && !UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
|
||||
namespace Microsoft.AppCenter.Unity.Distribute.Internal
|
||||
{
|
||||
class DistributeDelegate : AndroidJavaProxy
|
||||
{
|
||||
private DistributeDelegate() : base("com.microsoft.appcenter.distribute.DistributeListener")
|
||||
{
|
||||
}
|
||||
|
||||
public static void SetDelegate()
|
||||
{
|
||||
var distribute = new AndroidJavaClass("com.microsoft.appcenter.distribute.Distribute");
|
||||
distribute.CallStatic("setListener", new DistributeDelegate());
|
||||
}
|
||||
|
||||
bool onReleaseAvailable(AndroidJavaObject activity, AndroidJavaObject details)
|
||||
{
|
||||
if (Distribute.ReleaseAvailable == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var releaseDetails = ReleaseDetailsHelper.ReleaseDetailsConvert(details);
|
||||
return Distribute.ReleaseAvailable.Invoke(releaseDetails);
|
||||
}
|
||||
|
||||
void onNoReleaseAvailable(AndroidJavaObject activity)
|
||||
{
|
||||
if (Distribute.NoReleaseAvailable == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Distribute.NoReleaseAvailable.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user