Interface VersionService

  • All Known Implementing Classes:
    AndroidVersionService, DesktopVersionService, DummyVersionService, IOSVersionService

    public interface VersionService
    The version service provides access to the public and internal version numbers of the current application.

    Example

     VersionService.create()
          .ifPresent(version -> {
              System.out.println("Public version number: " + version.getVersionNumber());
              System.out.println("Internal build number: " + version.getBuildNumber());
          });
     

    Android Configuration: none

    iOS Configuration: none

    Since:
    4.0.13
    • Method Detail

      • getVersionNumber

        java.lang.String getVersionNumber()
        Retrieves the current version number of the application, which is typically visible to the users.
        Returns:
        A string with information of the public version of the application, or -1 if unknown
      • getBuildNumber

        java.lang.String getBuildNumber()
        Retrieves the current internal build number of the application, which is typically not shown to the users
        Returns:
        A string with information of the internal version of the application, or -1 if unknown