diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..7643783
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ xmlns:android
+
+ ^$
+
+
+
+
+
+
+
+
+ xmlns:.*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*:id
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ .*:name
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ name
+
+ ^$
+
+
+
+
+
+
+
+
+ style
+
+ ^$
+
+
+
+
+
+
+
+
+ .*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*
+
+ http://schemas.android.com/apk/res/android
+
+
+ ANDROID_ATTRIBUTE_ORDER
+
+
+
+
+
+
+ .*
+
+ .*
+
+
+ BY_NAME
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 0000000..79ee123
--- /dev/null
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/copilot.data.migration.agent.xml b/.idea/copilot.data.migration.agent.xml
index 57556ac..51eb2bc 100644
--- a/.idea/copilot.data.migration.agent.xml
+++ b/.idea/copilot.data.migration.agent.xml
@@ -3,10 +3,30 @@
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
-
-
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 94a25f7..35eb1dd 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 88cd9da..36c5893 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -66,4 +66,7 @@ dependencies {
// Navigation for Compose
implementation("androidx.navigation:navigation-compose:2.6.0")
+
+ // AndroidX SplashScreen (required for installSplashScreen API)
+ implementation("androidx.core:core-splashscreen:1.0.1")
}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 5094eae..ace9e6e 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -6,19 +6,18 @@
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
- android:icon="@mipmap/ic_launcher"
+ android:icon="@drawable/logo"
android:label="@string/app_name"
- android:roundIcon="@mipmap/ic_launcher_round"
+ android:roundIcon="@drawable/logo"
android:supportsRtl="true"
android:theme="@style/Theme.PanicButton">
+ android:theme="@style/Theme.App.Starting">
-
diff --git a/app/src/main/java/id/ac/ubharajaya/panicbutton/MainActivity.kt b/app/src/main/java/id/ac/ubharajaya/panicbutton/MainActivity.kt
index 61c2fba..2dd2213 100644
--- a/app/src/main/java/id/ac/ubharajaya/panicbutton/MainActivity.kt
+++ b/app/src/main/java/id/ac/ubharajaya/panicbutton/MainActivity.kt
@@ -13,7 +13,6 @@ class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
viewModel = ViewModelProvider(this).get(MainViewModel::class.java)
-
val openEvacMaps = {
startActivity(Intent(this, EvacuationMapsActivity::class.java))
}
@@ -23,4 +22,4 @@ class MainActivity : ComponentActivity() {
}
}
}
-}
+}
\ No newline at end of file
diff --git a/app/src/main/java/id/ac/ubharajaya/panicbutton/NotificationSender.kt b/app/src/main/java/id/ac/ubharajaya/panicbutton/NotificationSender.kt
index 819dc1d..a7c9e42 100644
--- a/app/src/main/java/id/ac/ubharajaya/panicbutton/NotificationSender.kt
+++ b/app/src/main/java/id/ac/ubharajaya/panicbutton/NotificationSender.kt
@@ -12,11 +12,10 @@ import java.io.IOException
object NotificationSender {
private val client = OkHttpClient.Builder()
.build()
-
- private const val url = "https://ntfy.ubharajaya.ac.id/panic-button"
+ private const val server = "https://ntfy.ubharajaya.ac.id"
+ private const val topic = "panic-button"
private const val TAG = "NotificationSender"
- // Header MUST be ASCII only
private fun sanitizeHeaderValue(value: String): String {
val sb = StringBuilder()
for (ch in value) {
@@ -29,6 +28,7 @@ object NotificationSender {
suspend fun sendNotification(message: String): String = withContext(Dispatchers.IO) {
try {
+ val url = "$server/$topic"
Log.d(TAG, "Preparing notification to $url")
// Title ONLY has emoji
diff --git a/app/src/main/res/drawable/logo.xml b/app/src/main/res/drawable/logo.xml
new file mode 100644
index 0000000..f077c58
--- /dev/null
+++ b/app/src/main/res/drawable/logo.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/splash_icon_padded.xml b/app/src/main/res/drawable/splash_icon_padded.xml
new file mode 100644
index 0000000..d121266
--- /dev/null
+++ b/app/src/main/res/drawable/splash_icon_padded.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ubhara.png b/app/src/main/res/drawable/ubhara.png
new file mode 100644
index 0000000..8994df4
Binary files /dev/null and b/app/src/main/res/drawable/ubhara.png differ
diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher.xml b/app/src/main/res/mipmap-anydpi/ic_launcher.xml
index 6f3b755..145a2d3 100644
--- a/app/src/main/res/mipmap-anydpi/ic_launcher.xml
+++ b/app/src/main/res/mipmap-anydpi/ic_launcher.xml
@@ -1,6 +1,6 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml
index 6f3b755..145a2d3 100644
--- a/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml
+++ b/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml
@@ -1,6 +1,6 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..f0b034d
--- /dev/null
+++ b/app/src/main/res/values/styles.xml
@@ -0,0 +1,10 @@
+
+
+
+
\ No newline at end of file