Local notifications: - NotificationHelper posts per-room notifications from the sync loop - Notifications suppressed when room is active (ChatScreen DisposableEffect) - Deferred for encrypted rooms until room key arrives; fires with real body - Notification tap navigates to the room via pendingRoomId StateFlow - POST_NOTIFICATIONS permission requested at runtime (API 33+) FCM push (app killed): - MatrixFirebaseMessagingService handles token refresh and data messages - Pusher registered with homeserver pointing to Cloudflare Worker gateway - gateway/src/index.js: Cloudflare Worker forwards Matrix pushes to FCM v1 API using a service-account JWT signed with Web Crypto - last_sync_token persisted in SharedPreferences so restored sessions start with an incremental sync and fire notifications immediately (fixes missed-on-wake bug) - Default FCM notification channel declared in manifest Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
72 lines
2 KiB
Kotlin
72 lines
2 KiB
Kotlin
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
alias(libs.plugins.kotlin.compose)
|
|
alias(libs.plugins.kotlin.serialization)
|
|
alias(libs.plugins.google.services)
|
|
}
|
|
|
|
android {
|
|
namespace = "com.ltadeu6.matrix"
|
|
compileSdk = 35
|
|
|
|
defaultConfig {
|
|
applicationId = "com.ltadeu6.matrix"
|
|
minSdk = 26
|
|
targetSdk = 35
|
|
versionCode = 1
|
|
versionName = "0.1.0"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = true
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
|
|
packaging {
|
|
jniLibs.pickFirsts += "**/*.so"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
implementation(libs.androidx.ui)
|
|
implementation(libs.androidx.ui.graphics)
|
|
implementation(libs.androidx.ui.tooling.preview)
|
|
implementation(libs.androidx.material3)
|
|
implementation(libs.androidx.navigation.compose)
|
|
implementation(libs.retrofit)
|
|
implementation(libs.okhttp)
|
|
implementation(libs.kotlinx.serialization.json)
|
|
implementation(libs.retrofit.converter.kotlinx.serialization)
|
|
implementation(libs.kotlinx.coroutines.android)
|
|
implementation(libs.androidx.browser)
|
|
implementation(libs.androidx.appcompat)
|
|
implementation(files("libs/olm-sdk-3.2.16.jar"))
|
|
implementation(platform(libs.firebase.bom))
|
|
implementation(libs.firebase.messaging)
|
|
debugImplementation(libs.androidx.ui.tooling)
|
|
debugImplementation(libs.okhttp.logging)
|
|
}
|