chore: 更新应用配置
- 更新AppConfig、AndroidManifest - 更新build.gradle.kts、settings.gradle.kts Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -151,6 +151,10 @@ dependencies {
|
||||
// DataStore
|
||||
implementation("androidx.datastore:datastore-preferences:1.0.0")
|
||||
|
||||
// Payment SDKs
|
||||
implementation("com.tencent.mm.opensdk:wechat-sdk-android:6.8.28") // 微信支付 SDK
|
||||
implementation("com.alipay.sdk:alipaysdk-android:15.8.17") // 支付宝 SDK
|
||||
|
||||
// Testing
|
||||
testImplementation(libs.junit)
|
||||
androidTestImplementation(libs.androidx.junit)
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
|
||||
<!-- 微信 SDK 需要查询微信是否已安装 -->
|
||||
<queries>
|
||||
<package android:name="com.tencent.mm" />
|
||||
</queries>
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
@@ -28,6 +33,13 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<!-- 微信支付回调 Activity(路径和类名固定,微信 SDK 硬性要求) -->
|
||||
<activity
|
||||
android:name=".wxapi.WXPayEntryActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -56,6 +56,15 @@ object AppConfig {
|
||||
*/
|
||||
val WS_BASE_URL: String = if (isDebugMode) DEV_WS_URL else PROD_WS_URL
|
||||
|
||||
// ==================== 支付配置 ====================
|
||||
|
||||
/**
|
||||
* 微信支付 APP_ID
|
||||
* 需要在微信开放平台注册应用后获取
|
||||
* TODO: 替换为实际的微信 APP_ID
|
||||
*/
|
||||
const val WECHAT_APP_ID = ""
|
||||
|
||||
// ==================== 说明 ====================
|
||||
//
|
||||
// 注意:从 Android 9 (API 28) 开始,默认禁止明文HTTP流量
|
||||
|
||||
@@ -16,6 +16,8 @@ dependencyResolutionManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
// 支付宝 SDK Maven 仓库
|
||||
maven { url = uri("https://maven.alipay.com/nexus/content/repositories/releases/") }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user