Menambahkan Activity di Andorid Manifest

This commit is contained in:
202310715297 RAIHAN ARIQ MUZAKKI 2025-11-27 15:51:42 +07:00
parent 327c9048a4
commit 9807c900dd
3 changed files with 13 additions and 13 deletions

View File

@ -30,6 +30,7 @@
</activity>
<activity android:name=".JalurEvakuasiActivity" />
<activity android:name=".AlertActivity" />
</application>
</manifest>

View File

@ -69,7 +69,7 @@ fun AlertScreen() {
horizontalAlignment = Alignment.CenterHorizontally
) {
Text(
text = " SISTEM ALERT DARURAT",
text = " SISTEM ALERT DARURAT",
fontSize = 24.sp,
color = Color.Red,
modifier = Modifier.padding(bottom = 8.dp)
@ -87,7 +87,7 @@ fun AlertScreen() {
"🔥 KEBAKARAN" to "fire",
"🌊 BANJIR/TSUNAMI" to "ocean",
"🌏 GEMPA BUMI" to "earth_asia",
" BAHAYA RADIASI" to "radioactive",
" BAHAYA RADIASI" to "radioactive",
"🚨 EVAKUASI SEGERA" to "rotating_light"
)
@ -189,7 +189,7 @@ fun sendQuickAlert(url: String, alertType: String, tag: String, onResult: (Strin
val client = OkHttpClient()
val message = """
ALERT DARURAT
ALERT DARURAT
Jenis: $alertType
Waktu: ${java.text.SimpleDateFormat("dd/MM/yyyy HH:mm:ss", java.util.Locale.getDefault()).format(java.util.Date())}
@ -260,5 +260,4 @@ fun sendCustomAlert(url: String, customMessage: String, onResult: (String) -> Un
onResult("❌ Error: ${e.message}")
}
}.start()
}
}

View File

@ -148,7 +148,7 @@ fun MyApp() {
onClick = { showSettingsDialog = true },
colors = ButtonDefaults.buttonColors(containerColor = Color.Gray)
) {
Text("", fontSize = 18.sp)
Text("", fontSize = 18.sp)
}
}
@ -161,9 +161,9 @@ fun MyApp() {
)
listOf(
"🔥 Kebakaran", " Banjir", "🌊 Tsunami", "🌋 Gunung Meletus",
"🔥 Kebakaran", " Banjir", "🌊 Tsunami", "🌋 Gunung Meletus",
"🌏 Gempa Bumi", "👿 Huru hara", "🐍 Binatang Buas",
" Radiasi Nuklir", " Biohazard"
" Radiasi Nuklir", " Biohazard"
).forEach { condition ->
Row(
modifier = Modifier
@ -228,7 +228,7 @@ fun MyApp() {
Spacer(modifier = Modifier.height(16.dp))
Text(
text = "JANGAN PANIK! SEGERA EVAKUASI DIRI ANDA KE TITIK KUMPUL",
text = "JANGAN PANIK! SEGERA EVAKUASI\nDIRI ANDA KE TITIK KUMPUL",
color = Color.Red,
fontSize = 15.sp
)
@ -252,14 +252,14 @@ fun sendNotification(url: String, condition: String, report: String, onResult: (
val tagMapping = mapOf(
"🔥 Kebakaran" to "fire",
" Banjir" to "cloud_with_lightning_and_rain",
" Banjir" to "cloud_with_lightning_and_rain",
"🌊 Tsunami" to "ocean",
"🌋 Gunung Meletus" to "volcano",
"🌏 Gempa Bumi" to "earth_asia",
"👿 Huru hara" to "imp",
"🐍 Binatang Buas" to "snake",
" Radiasi Nuklir" to "radioactive",
" Biohazard" to "biohazard"
" Radiasi Nuklir" to "radioactive",
" Biohazard" to "biohazard"
)
val selectedList = condition
@ -278,7 +278,7 @@ fun sendNotification(url: String, condition: String, report: String, onResult: (
)
val request = Request.Builder()
.url(url)
.addHeader("Title", " ALERT - Kondisi Darurat")
.addHeader("Title", " ALERT - Kondisi Darurat")
.addHeader("Priority", "urgent")
.addHeader("Tags", finalTags.joinToString(","))
.post(requestBody)