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 Summary

    Modifier and Type
    Method
    Description
    Returns an instance of VersionService.
    Retrieves the current internal build number of the application, which is typically not shown to the users
    Retrieves the current version number of the application, which is typically visible to the users.
  • Method Details

    • create

      static Optional<VersionService> create()
      Returns an instance of VersionService.
      Returns:
      An instance of VersionService.
    • getVersionNumber

      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

      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