getRuntimeVersion
Get the Runtime Version Number
getRuntimeVersion is a lightweight query interface that returns the specific version number of the SUD Runtime SDK module currently integrated in the application.
When handling multi-version compatibility, reporting logs, or performing remote diagnostics, the data provided by this interface is a key basis for judging the environment's supported capabilities.
Method Declaration
java
/**
* Return the version number of the Runtime SDK module
* * @return The version number as a string (e.g. "1.2.30")
*/
String getRuntimeVersion();Runtime Behavior
- Static query: This method usually reads a version constant defined inside the SDK directly, so the call overhead is minimal.
- No initialization required: In most cases, this method can be called as soon as the SDK instance is created, without waiting for
loadCoreto complete (this depends on the SDK's internal implementation, but it is usually provided as basic information).
Example
java
// Get the version number and print it
String version = runtime.getRuntimeVersion();
Log.i("SUDOP", "Current SUD Runtime Version: " + version);
// Example use: version reporting
Map<String, String> logParams = new HashMap<>();
logParams.put("sdk_version", version);
logParams.put("device_model", Build.MODEL);Notes
- Format convention: The version number usually follows Semantic Versioning, composed of "major.minor.patch".
- Distinction from getRuntimeDesc:
getRuntimeVersionreturns only the numeric version number. If you need more detailed build information (such as build time or Commit ID), you should usegetRuntimeDesc().
