From 0f94b90516543a0edabeff13b558bbbcbe04fce6 Mon Sep 17 00:00:00 2001 From: imndx Date: Tue, 19 Nov 2024 11:15:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8C=85=E5=90=8D=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 ++++- chat/agconnect-services.json | 2 +- chat/build.gradle | 2 +- chat/google-services.json | 2 +- chat/src/main/java/cn/wildfire/chat/app/AppService.java | 4 ++++ 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 85ad36145..f98671041 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,12 @@ 本工程为野火IM Android App,开发过程中,充分考虑了二次开发和集成需求,可作为SDK集成到其他应用中,或者直接进行二次开发。 - 开发一套IM系统真的很艰辛,请路过的朋友们给点个star,支持我们坚持下去🙏🙏🙏🙏🙏 +## 关于包名/applicationId +1. 开发者开发具体产品时,请勿直接使用本 demo 的包名/applicationId,我们会不定期修改包名/applicationId +2. 禁止将本产品用于非法目的,一经发现,我们将停止任何形式的技术支持 + ## 开发调试说明 1. JDK: 17 2. 我们采用最新稳定版Android Studio及对应的gradle进行开发,对于旧版本的IDE,我们没有测试,编译之类问题,需自行解决。 diff --git a/chat/agconnect-services.json b/chat/agconnect-services.json index 2f7d7587e..ba85fae04 100644 --- a/chat/agconnect-services.json +++ b/chat/agconnect-services.json @@ -9,7 +9,7 @@ "client_id":"363427384201839680", "client_secret":"D438F2D56536240581DC197C468900E6EA0E0FF37F563B79D7765B34A5077B7F", "app_id":"100221325", - "package_name":"cn.wildfirechat.chat", + "package_name":"cn.wildfirechat.chat.open", "api_key":"CV7m3BB7QS4BJqCKyrCkda06gp0tWFCMYzZP+a7I5NJHi7l4dTk0rP87aDCDh3dRU1sDrLOMiZr2bMNNKQ34zuwJ6KjT" }, "service":{ diff --git a/chat/build.gradle b/chat/build.gradle index 58aef6b25..be01505d3 100644 --- a/chat/build.gradle +++ b/chat/build.gradle @@ -16,7 +16,7 @@ android { compileSdkVersion 34 ndkVersion '18.1.5063045' defaultConfig { - applicationId "cn.wildfirechat.chat" + applicationId "cn.wildfirechat.chat.open" minSdkVersion 21 targetSdkVersion 33 versionCode 55 diff --git a/chat/google-services.json b/chat/google-services.json index b966a5b50..300781b85 100644 --- a/chat/google-services.json +++ b/chat/google-services.json @@ -9,7 +9,7 @@ "client_info": { "mobilesdk_app_id": "1:387942673236:android:74dd044e8c21c0e4d776c1", "android_client_info": { - "package_name": "cn.wildfirechat.chat" + "package_name": "cn.wildfirechat.chat.open" } }, "oauth_client": [ diff --git a/chat/src/main/java/cn/wildfire/chat/app/AppService.java b/chat/src/main/java/cn/wildfire/chat/app/AppService.java index 28cf242f4..dc49cb9de 100644 --- a/chat/src/main/java/cn/wildfire/chat/app/AppService.java +++ b/chat/src/main/java/cn/wildfire/chat/app/AppService.java @@ -540,6 +540,10 @@ public static void validateConfig(Context context) { } } } + + if (!BuildConfig.DEBUG && BuildConfig.APPLICATION_ID.startsWith("cn.wildfire")) { + Toast.makeText(context, "上线时,请勿直接使用野火的包名!!!", Toast.LENGTH_LONG).show(); + } } @Override