static void SetReleaseAvailableCallback(ReleaseAvailableCallback releaseAvailableCallback) { lock (typeof(Distribute)) { _releaseAvailableCallback = releaseAvailableCallback; if (_delegate == null && _releaseAvailableCallback != null) { _delegate = new Delegate(); MSDistribute.SetDelegate(_delegate); } } }
static void HandleUpdateAction(UpdateAction updateAction) { switch (updateAction) { case UpdateAction.Update: MSDistribute.NotifyUpdateAction(MSUpdateAction.Update); break; case UpdateAction.Postpone: MSDistribute.NotifyUpdateAction(MSUpdateAction.Postpone); break; } }
public override bool OnReleaseAvailable(MSDistribute distribute, MSReleaseDetails details) { if (_releaseAvailableCallback != null) { Uri releaseNotesUrl = null; if (details.ReleaseNotesUrl != null) { releaseNotesUrl = new Uri(details.ReleaseNotesUrl.ToString()); } var releaseDetails = new ReleaseDetails { Id = details.Id, ShortVersion = details.ShortVersion, Version = details.Version, ReleaseNotes = details.ReleaseNotes, ReleaseNotesUrl = releaseNotesUrl, MandatoryUpdate = details.MandatoryUpdate }; return(_releaseAvailableCallback(releaseDetails)); } return(false); }
/// <summary> /// Process URL request for the Distribute service. /// Place this method call into app delegate openUrl method. /// </summary> /// <param name="url">The url with parameters.</param> public static void OpenUrl(NSUrl url) { MSDistribute.OpenUrl(url); }
static void PlatformSetApiUrl(string apiUrl) { MSDistribute.SetApiUrl(apiUrl); }
static void PlatformSetInstallUrl(string installUrl) { MSDistribute.SetInstallUrl(installUrl); }
static Task <bool> PlatformIsEnabledAsync() { return(Task.FromResult(MSDistribute.IsEnabled())); }
static Task PlatformSetEnabledAsync(bool enabled) { MSDistribute.SetEnabled(enabled); return(Task.FromResult(default(object))); }
private static void PlatformUnsetInstance() { MSDistribute.ResetSharedInstance(); }
static UpdateTrack GetUpdateTrack() { var updateTrackValue = (int)MSDistribute.GetUpdateTrack(); return((UpdateTrack)updateTrackValue); }
static void SetUpdateTrack(UpdateTrack updateTrack) { var updateTrackValue = (int)updateTrack; MSDistribute.SetUpdateTrack((MSUpdateTrack)updateTrackValue); }
static void PlatformDisableAutomaticCheckForUpdate() { MSDistribute.DisableAutomaticCheckForUpdate(); }
static void PlatformCheckForUpdate() { MSDistribute.CheckForUpdate(); }