diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 0b83186e1..adc2c0efc 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -165,6 +165,9 @@ + diff --git a/common/src/main/java/com/yunbao/common/CommonAppConfig.java b/common/src/main/java/com/yunbao/common/CommonAppConfig.java index 9f78b5fac..c72a2207d 100644 --- a/common/src/main/java/com/yunbao/common/CommonAppConfig.java +++ b/common/src/main/java/com/yunbao/common/CommonAppConfig.java @@ -38,6 +38,7 @@ public class CommonAppConfig { //是否为插件包模式 public static final boolean IS_PLUGIN_MODEL = getMetaDataBoolean("IS_PLUGIN_MODEL"); public static final String BUILD_TIME = getMetaDataString("BUILD_TIME"); + public static final boolean IS_SW_RELEASE = getMetaDataBoolean("SW_RELEASE_MODEL"); //外部sd卡 public static final String DCMI_PATH = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath(); @@ -85,10 +86,10 @@ public class CommonAppConfig { public static final String SWAPPId = "d4a5879524d74c20a7bdd667b0f2ca21"; public static String getSwAppId() { - if (BuildConfig.DEBUG) { - return SWAPPId_debug; - } else { + if (IS_SW_RELEASE) { return SWAPPId; + } else { + return SWAPPId_debug; } } diff --git a/config.gradle b/config.gradle index 717d8024b..1bd0a5f16 100644 --- a/config.gradle +++ b/config.gradle @@ -17,6 +17,8 @@ ext { //百度语音识别 + swReleaseModel : true, //true声网正式服 false测试服 + baiduAppId : "23774720", baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB",