public static AppCenterTask <ErrorReport> GetLastSessionCrashReportAsync() { var errorReportPtr = appcenter_unity_crashes_last_session_crash_report(); var errorReport = GetErrorReportFromIntPtr(errorReportPtr); return(AppCenterTask <ErrorReport> .FromCompleted(errorReport)); }
public static AppCenterTask <string> GetInstallIdAsync() { AndroidJavaObject future = _appCenter.CallStatic <AndroidJavaObject>("getInstallId"); var javaUUIDtask = new AppCenterTask <AndroidJavaObject>(future); var stringTask = new AppCenterTask <string>(); javaUUIDtask.ContinueWith(t => { var installId = t.Result == null ? null : t.Result.Call <string>("toString"); stringTask.SetResult(installId); }); return(stringTask); }
public static AppCenterTask <string> GetInstallIdAsync() { Prepare(); var installIdTask = UWPAppCenter.GetInstallIdAsync(); var stringTask = new AppCenterTask <string>(); installIdTask.ContinueWith(t => { var installId = t.Result?.ToString(); stringTask.SetResult(installId); }); return(stringTask); }
public static AppCenterTask <ErrorReport> GetLastSessionCrashReportAsync() { var future = _crashes.CallStatic <AndroidJavaObject>("getLastSessionCrashReport"); var javaTask = new AppCenterTask <AndroidJavaObject>(future); var errorReportTask = new AppCenterTask <ErrorReport>(); javaTask.ContinueWith(t => { var errorReport = JavaObjectsConverter.ConvertErrorReport(t.Result); errorReportTask.SetResult(errorReport); }); return(errorReportTask); }
public static AppCenterTask <UserInformation> SignInAsync() { if (_signInTask != null) { var localSignInTask = new AppCenterTask <UserInformation>(); var exception = new Exception("Sign-in already in progress"); localSignInTask.SetException(exception); return(localSignInTask); } else { // Create a local variable to avoid race condition var localSignInTask = new AppCenterTask <UserInformation>(); _signInTask = localSignInTask; appcenter_unity_auth_sign_in_with_completion_handler(SignInCompletionHandlerNativeFunc); return(localSignInTask); } }
public static void SignInCompletionHandlerNativeFunc(IntPtr userInformationPtr, IntPtr nsErrorPtr) { if (_signInTask == null) { return; } else { var userInformation = GetUserInformationFromIntPtr(userInformationPtr); if (nsErrorPtr == IntPtr.Zero) { _signInTask.SetResult(userInformation); } else { _signInTask.SetException(NSErrorHelper.ToSystemException(nsErrorPtr)); } _signInTask = null; } }
public static AppCenterTask <UserInformation> SignInAsync() { var future = _auth.CallStatic <AndroidJavaObject>("signIn"); var javaTask = new AppCenterTask <AndroidJavaObject>(future); var signInTask = new AppCenterTask <UserInformation>(); javaTask.ContinueWith(t => { var exception = t.Result.Call <AndroidJavaObject>("getException"); if (exception == null) { var userInfo = t.Result.Call <AndroidJavaObject>("getUserInformation"); var accountId = userInfo.Call <string>("getAccountId"); var accessToken = userInfo.Call <string>("getAccessToken"); var idToken = userInfo.Call <string>("getIdToken"); signInTask.SetResult(new UserInformation(accountId, accessToken, idToken)); } else { signInTask.SetException(ConvertException(exception)); } }); return(signInTask); }
public static AppCenterTask <bool> IsEnabledAsync() { return(AppCenterTask <bool> .FromCompleted(false)); }
public static AppCenterTask <bool> HasCrashedInLastSessionAsync() { return(AppCenterTask <bool> .FromCompleted(false)); }
public static AppCenterTask <bool> HasCrashedInLastSessionAsync() { var hasCrashedInLastSession = appcenter_unity_crashes_has_crashed_in_last_session(); return(AppCenterTask <bool> .FromCompleted(hasCrashedInLastSession)); }
public static AppCenterTask SetEnabledAsync(bool enabled) { return(AppCenterTask.FromCompleted()); }
public static AppCenterTask <string> GetInstallIdAsync() { var installId = appcenter_unity_get_install_id(); return(AppCenterTask <string> .FromCompleted(installId)); }
public static AppCenterTask <UserInformation> SignInAsync() { return(AppCenterTask <UserInformation> .FromCompleted(null)); }
public static AppCenterTask SetEnabledAsync(bool isEnabled) { appcenter_unity_set_enabled(isEnabled); return(AppCenterTask.FromCompleted()); }
public static AppCenterTask <bool> IsEnabledAsync() { var isEnabled = appcenter_unity_is_enabled(); return(AppCenterTask <bool> .FromCompleted(isEnabled)); }
public static AppCenterTask <bool> HasReceivedMemoryWarningInLastSessionAsync() { var hadWarning = appcenter_unity_crashes_has_received_memory_warning_in_last_session(); return(AppCenterTask <bool> .FromCompleted(hadWarning)); }
public static AppCenterTask <string> GetMinidumpDirectoryAsync() { return(AppCenterTask <string> .FromCompleted("")); }
public static AppCenterTask SetEnabledAsync(IntPtr transmissionTarget, bool enabled) { appcenter_unity_transmission_target_set_enabled(transmissionTarget, enabled); return(AppCenterTask.FromCompleted()); }
public static AppCenterTask <bool> HasReceivedMemoryWarningInLastSessionAsync() { return(AppCenterTask <bool> .FromCompleted(false)); }
public static AppCenterTask <bool> IsEnabledAsync(RawType transmissionTarget) { return(AppCenterTask <bool> .FromCompleted(false)); }
public static AppCenterTask SetEnabledAsync(RawType transmissionTarget, bool enabled) { return(AppCenterTask.FromCompleted()); }
public static AppCenterTask <string> GetInstallIdAsync() { return(AppCenterTask <string> .FromCompleted("")); }
public static AppCenterTask <bool> IsEnabledAsync(IntPtr transmissionTarget) { bool isEnabled = appcenter_unity_transmission_target_is_enabled(transmissionTarget); return(AppCenterTask <bool> .FromCompleted(isEnabled)); }
public static AppCenterTask <ErrorReport> GetLastSessionCrashReportAsync() { return(AppCenterTask <ErrorReport> .FromCompleted(null)); }