From 8a0bef9d0dcb71d706317ba74807eafa8f2cea9a Mon Sep 17 00:00:00 2001 From: dend <2023010715051@mhs.ubharajaya.ac.id> Date: Fri, 28 Nov 2025 00:36:06 +0700 Subject: [PATCH] Add NTFY configuration settings and persistence using SharedPreferences Komit ini mengimplementasikan fitur konfigurasi endpoint NTFY yang dinamis dan menyimpannya menggunakan SharedPreferences. Ini mencakup penambahan layar pengaturan (SettingsScreen), perbaikan navigasi kembali menggunakan BackHandler, dan pembaruan fungsi sendNotification agar membaca URL dari konfigurasi yang disimpan. --- app/build.gradle.kts | 21 ++++++++++++--------- app/src/main/AndroidManifest.xml | 18 ++++++++++-------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f685a40..c8e48c8 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -42,17 +42,26 @@ android { } dependencies { +// OkHttp untuk HTTP request implementation("com.squareup.okhttp3:okhttp:4.11.0") - implementation("androidx.compose.material3:material3:1.1.1") + + // Coroutines untuk manajemen thread, penting untuk OkHttp + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") + + // Core AndroidX dan Compose BOM implementation(libs.androidx.core.ktx) implementation(libs.androidx.lifecycle.runtime.ktx) implementation(libs.androidx.activity.compose) implementation(platform(libs.androidx.compose.bom)) + + // Compose UI & Material3 implementation(libs.androidx.compose.ui) implementation(libs.androidx.compose.ui.graphics) - implementation(libs.androidx.compose.ui.tooling.preview) - implementation(libs.androidx.compose.material3) + implementation(libs.androidx.compose.material3) // Diambil dari BOM implementation(libs.androidx.compose.foundation) + + // Tools dan Testing + implementation(libs.androidx.compose.ui.tooling.preview) testImplementation(libs.junit) androidTestImplementation(libs.androidx.junit) androidTestImplementation(libs.androidx.espresso.core) @@ -61,10 +70,4 @@ dependencies { debugImplementation(libs.androidx.compose.ui.tooling) debugImplementation(libs.androidx.compose.ui.test.manifest) - implementation("com.squareup.okhttp3:okhttp:4.11.0") - implementation("androidx.compose.material3:material3:1.1.1") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3") - } \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index ca2c22b..3d1a108 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,11 +1,8 @@ + xmlns:tools="http://schemas.android.com/tools"> - - + android:theme="@style/Theme.PanicButton" + android:usesCleartextTraffic="true" + > - - - + + + + \ No newline at end of file