- 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 TypeMethodDescriptionstatic Optional<VersionService>
create()
Returns an instance ofVersionService
.Retrieves the current internal build number of the application, which is typically not shown to the usersRetrieves the current version number of the application, which is typically visible to the users.
-
Method Details
-
create
Returns an instance ofVersionService
.- 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
-