feat:Android notification

This commit is contained in:
2025-11-03 11:25:39 +08:00
parent 8d513ad702
commit d6339b746b
5 changed files with 2595 additions and 30 deletions

View File

@@ -1,5 +1,10 @@
import groovy.json.JsonOutput
apply plugin: 'com.android.application'
def apiBaseUrl = project.hasProperty("API_BASE_URL") ? project.property("API_BASE_URL") : "http://10.0.2.2:4000/api"
def notificationSecret = project.hasProperty("NOTIFICATION_WEBHOOK_SECRET") ? project.property("NOTIFICATION_WEBHOOK_SECRET") : "CHANGE_ME"
android {
namespace "com.bill.ai"
compileSdk rootProject.ext.compileSdkVersion
@@ -15,6 +20,11 @@ android {
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
}
buildConfigField "String", "API_BASE_URL", JsonOutput.toJson(apiBaseUrl)
buildConfigField "String", "NOTIFICATION_WEBHOOK_SECRET", JsonOutput.toJson(notificationSecret)
}
buildFeatures {
buildConfig true
}
buildTypes {
release {
@@ -36,6 +46,7 @@ dependencies {
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
implementation project(':capacitor-android')
implementation "com.squareup.okhttp3:okhttp:4.12.0"
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"