//获取当前应用程序实例ID。 public Task <string> DisplayAnalyticsInstanceId() { return(FirebaseAnalytics.GetAnalyticsInstanceIdAsync().ContinueWith(task => { if (task.IsCanceled) { Debug.Log("APP实例ID获取被取消。 == App instance ID fetch was canceled."); } else if (task.IsFaulted) { Debug.Log(String.Format("枚举一个获取错误的应用程序实例ID== Encounted an error fetching app instance ID {0}", task.Exception.ToString())); } else if (task.IsCompleted) { Debug.Log(String.Format("App instance ID: {0}", task.Result)); } return task; }).Unwrap()); }