-
- 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
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static java.util.Optional<VersionService>
create()
Returns an instance ofVersionService
.java.lang.String
getBuildNumber()
Retrieves the current internal build number of the application, which is typically not shown to the usersjava.lang.String
getVersionNumber()
Retrieves the current version number of the application, which is typically visible to the users.
-
-
-
Method Detail
-
create
static java.util.Optional<VersionService> create()
Returns an instance ofVersionService
.- Returns:
- An instance of
VersionService
.
-
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
-
-