Class DistributionIntegration

  • All Implemented Interfaces:
    io.sentry.IDistributionApi , io.sentry.Integration

    @ApiStatus.Experimental() 
    public final class DistributionIntegration
     implements Integration, IDistributionApi
                        

    The public Android SDK for Sentry Build Distribution.

    Provides functionality to check for app updates and download new versions from Sentry's preprod artifacts system.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit register(IScopes scopes, SentryOptions options) Registers the Distribution integration with Sentry.
      UpdateStatus checkForUpdateBlocking() Check for available updates synchronously (blocking call).
      Future<UpdateStatus> checkForUpdate() Check for available updates asynchronously.
      Unit downloadUpdate(UpdateInfo info) Download and install the provided update by opening the download URL in the default browser or appropriate application.
      Boolean isEnabled() Check if the distribution integration is enabled.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DistributionIntegration

        DistributionIntegration(Context context)
    • Method Detail

      • register

         Unit register(IScopes scopes, SentryOptions options)

        Registers the Distribution integration with Sentry.

        Parameters:
        scopes - the Scopes
        options - the options
      • checkForUpdateBlocking

         UpdateStatus checkForUpdateBlocking()

        Check for available updates synchronously (blocking call). This method will block the calling thread while making the network request. Consider using checkForUpdate with callback for non-blocking behavior.

        Returns:

        UpdateStatus indicating if an update is available, up to date, or error

      • checkForUpdate

         Future<UpdateStatus> checkForUpdate()

        Check for available updates asynchronously.

        Returns:

        Future that will resolve to an UpdateStatus result

      • downloadUpdate

         Unit downloadUpdate(UpdateInfo info)

        Download and install the provided update by opening the download URL in the default browser or appropriate application.

        Parameters:
        info - Information about the update to download
      • isEnabled

         Boolean isEnabled()

        Check if the distribution integration is enabled.

        Returns:

        true if the distribution integration is enabled