fix: 更新 PushToken 重试间隔为 8s, 添加无网络判定
Signed-off-by: huyufei <yufei.hu@castbox.fm>
parent
7237dbfcae
commit
447740487e
|
|
@ -13,7 +13,7 @@ namespace Guru
|
|||
public static partial class FirebaseUtil
|
||||
{
|
||||
private static int _retryDeviceCount = 1;
|
||||
private const int _retryTokenDelay = 2;
|
||||
private const int _retryTokenDelay = 8;
|
||||
// public static bool? IsInitMessage;
|
||||
private static bool _isAutoFetchFcmToken = true;
|
||||
private static bool _isFetchOnce = false;
|
||||
|
|
@ -52,6 +52,13 @@ namespace Guru
|
|||
/// </summary>
|
||||
private static void GetFCMTokenAsync()
|
||||
{
|
||||
if (!NetworkUtil.IsNetAvailable)
|
||||
{
|
||||
// 无网络直接重新获取
|
||||
DelayGetFCMToken(_retryTokenDelay);
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log($"{LOG_TAG}[SDK]--- Start GetTokenAsync ---");
|
||||
FirebaseMessaging.GetTokenAsync().ContinueWithOnMainThread(task =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue