Exemplo n.º 1
0
        /// <summary>
        /// Returns a debug string containing all fields of this class.
        /// </summary>
        public override string ToString()
        {
            var infoDescription = new StringBuilder();

            infoDescription.AppendFormat("version={0} ", AvailableVersionCode);
            infoDescription.AppendFormat("status={0} ", AppUpdateStatus);
            infoDescription.AppendFormat("availability={0} ", UpdateAvailability);
            infoDescription.AppendFormat("downloaded={0} ", BytesDownloaded);
            infoDescription.AppendFormat("priority={0} ", UpdatePriority);
            infoDescription.AppendFormat("staleness={0} ", ClientVersionStalenessDays);
            infoDescription.AppendFormat("totalBytes={0} ", TotalBytesToDownload);
            infoDescription.AppendFormat("immediateAllowed={0}",
                                         IsUpdateTypeAllowed(AppUpdateOptions.ImmediateAppUpdateOptions()));
            infoDescription.AppendFormat("flexibleAllowed={0}",
                                         IsUpdateTypeAllowed(AppUpdateOptions.FlexibleAppUpdateOptions()));
            return(infoDescription.ToString());
        }
Exemplo n.º 2
0
 /// <summary>
 /// Starts an in-app update flow for the specified update type. Before calling this method use
 /// <see cref="GetAppUpdateInfo"/> to get an <see cref="AppUpdateInfo"/> object.
 /// </summary>
 /// <param name="appUpdateInfo">The result of a successful call to <see cref="GetAppUpdateInfo"/>.</param>
 /// <param name="appUpdateOptions">The type of update flow and additional options.</param>
 /// <returns>
 /// An <see cref="AppUpdateRequest"/> that can be used to monitor the requested in-app update flow.
 /// </returns>
 /// <exception cref="ArgumentNullException">Thrown if any parameter is null.</exception>
 public AppUpdateRequest StartUpdate(AppUpdateInfo appUpdateInfo, AppUpdateOptions appUpdateOptions)
 {
     return(_appUpdateManagerInternal.StartUpdateInternal(appUpdateInfo, appUpdateOptions));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Returns true if an update with the specified options is allowed, false otherwise.
 /// </summary>
 /// <param name="appUpdateOptions">The type of update to perform.</param>
 public bool IsUpdateTypeAllowed(AppUpdateOptions appUpdateOptions)
 {
     return(_javaAppUpdateInfo.Call <bool>("isUpdateTypeAllowed", appUpdateOptions.GetJavaAppUpdateOptions()));
 }