Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(android) add SDK version information

Saúl Ibarra Corretgé2c968809854b
diff --git a/android/gradle.properties b/android/gradle.properties
index 35224bebf1..4ec9419dab 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -27,4 +27,4 @@ android.enableJetifier=true
android.bundle.enableUncompressedNativeLibs=false
appVersion=99.0.0
-sdkVersion=99.0.0
+sdkVersion=0.0.0
diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle
index 95c979d610..bf7d12696a 100644
--- a/android/sdk/build.gradle
+++ b/android/sdk/build.gradle
@@ -8,6 +8,7 @@ android {
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
+ buildConfigField "String", "SDK_VERSION", "\"$sdkVersion\""
}
buildTypes {
diff --git a/android/sdk/src/main/java/org/jitsi/meet/sdk/AppInfoModule.java b/android/sdk/src/main/java/org/jitsi/meet/sdk/AppInfoModule.java
index 479d054f13..7377fc164a 100644
--- a/android/sdk/src/main/java/org/jitsi/meet/sdk/AppInfoModule.java
+++ b/android/sdk/src/main/java/org/jitsi/meet/sdk/AppInfoModule.java
@@ -1,5 +1,5 @@
/*
- * Copyright @ 2017-present Atlassian Pty Ltd
+ * Copyright @ 2017-present 8x8, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@ class AppInfoModule
public static final String NAME = "AppInfo";
public static final boolean GOOGLE_SERVICES_ENABLED = getGoogleServicesEnabled();
public static final boolean LIBRE_BUILD = getLibreBuild();
+ public static final String SDK_VERSION = getSdkVersion();
public AppInfoModule(ReactApplicationContext reactContext) {
super(reactContext);
@@ -79,6 +80,7 @@ class AppInfoModule
constants.put(
"version",
packageInfo == null ? "" : packageInfo.versionName);
+ constants.put("sdkVersion", SDK_VERSION);
constants.put("LIBRE_BUILD", LIBRE_BUILD);
constants.put("GOOGLE_SERVICES_ENABLED", GOOGLE_SERVICES_ENABLED);
@@ -116,6 +118,19 @@ class AppInfoModule
return false;
}
+ /**
+ * Gets the SDK version.
+ */
+ private static String getSdkVersion() {
+ Object sdkVersion = getBuildConfigValue("SDK_VERSION");
+
+ if (sdkVersion !=null) {
+ return (String) sdkVersion;
+ }
+
+ return "";
+ }
+
/**
* Gets build config value of a certain field.
*