Package 

Interface UpdateManager

  • All Implemented Interfaces:

    
    public interface UpdateManager
    
                        

    Manages operations that allow your app to initiate its own updates.

    You ca create this class using its factory

    <p>For example,<pre><code> val updateManager = UpdateManagerFactory.create(context) </code></pre>
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • checkUpdateInfoStatus

         abstract Unit checkUpdateInfoStatus(@NonNull() UpdateInfoListener updateInfoListener)

        Requests the update availability for the current app, and the state of update. The result is {@link dev.kiki.core.update.UpdateInfoResultListener UpdateInfoResultListener} which contains a UpdateInfo as a result.

        Parameters:
        updateInfoListener - returns an UpdateInfo in its onSucess
      • startUpdateFlow

         abstract Unit startUpdateFlow(@NonNull() Context context, @Nullable() Boolean shouldHideUi)

        Starts the update flow.

        <p>Starts a flow with provided {@code shouldHideUi} to hide default ui or update silently when {@code shouldHideUi = true}.

        This function will start update only if it could get update info successfully.

        <p>The result from the In-app update flow's Activity will be returned within the {@link dev.kiki.core.install.InstallStateListener InstallStateListener}. If the update flow was started, you can check update status using {@link #registerListener(dev.kiki.core.install.InstallStateListener)}.
        Parameters:
        context - the Context to run intent.
        shouldHideUi - the ui config, which is the option to hide default ui.
      • startUpdateFlow

         abstract Unit startUpdateFlow(@NonNull() Context context)

        Starts the update flow.

        <p>Starts an update flow with default user interface.

        This function will start update only if it could get update info successfully.

        <p>The result from the In-app update flow's Activity will be returned within the {@link dev.kiki.core.install.InstallStateListener InstallStateListener}. If the update flow was started, you can check update status using {@link #registerListener(dev.kiki.core.install.InstallStateListener)}.
        Parameters:
        context - the Context to run intent.
      • startUpdateFlow

         abstract Unit startUpdateFlow(@NonNull() Context context, @NonNull() UpdateInfo updateInfo, @Nullable() Boolean shouldHideUi)

        Starts the update flow immediately with your updateInfo.

        <p>Starts a flow with provided {@code shouldHideUi} to hide default ui or update silently when {@code shouldHideUi = true}.<p>The result from the In-app update flow's Activity will be returned within the {@link dev.kiki.core.install.InstallStateListener InstallStateListener}. If the update flow was started, you can check update status using {@link #registerListener(dev.kiki.core.install.InstallStateListener)}.
        Parameters:
        context - the Context to run intent.
        updateInfo - the Update info you've get from {@link #updateStatus(updateStatusListener) updateStatus}
        shouldHideUi - the update ui config, which is including the option to hide default ui.
      • startUpdateFlow

         abstract Unit startUpdateFlow(@NonNull() Context context, @NonNull() UpdateInfo updateInfo)
        <p>Starts an update flow with default user interface.<p>The result from the In-app update flow's Activity will be returned within the {@link dev.kiki.core.install.InstallStateListener InstallStateListener}. If the update flow was started, you can check update status using {@link #registerListener(dev.kiki.core.install.InstallStateListener)}.
        Parameters:
        context - the Context to run intent.
        updateInfo - the Update info you've get from {@link #updateStatus(updateStatusListener) updateStatus}
      • registerListener

         abstract Unit registerListener(@NonNull() UpdateStateListener updateStateListener)

        Registers a listener for this app that receives state changes for self-update operations. Listeners should be unregistered using {@link #unregisterListener} when you no longer need them.

        Parameters:
        updateStateListener - the listener you want to register
      • unregisterListener

         abstract Unit unregisterListener(@NonNull() UpdateStateListener updateStateListener)

        Unregisters a listener you previously registered using {@link #registerListener}.

        Parameters:
        updateStateListener - the listener you want to unregister
      • getShareLink

         abstract String getShareLink()

        This function will return the share link of your app to share it. You can provide this link for your user to share it with others.