Progress Praktikum-1

This commit is contained in:
202310715297 RAIHAN ARIQ MUZAKKI 2025-11-13 15:10:18 +07:00
parent 86ba20f78c
commit 0bd6dfe8c0

View File

@ -62,16 +62,20 @@ fun sendNotification(onResult: (String) -> Unit) {
val requestBody = RequestBody.create( val requestBody = RequestBody.create(
"text/plain".toMediaType(), // Mengirim plain text "text/plain".toMediaType(), // Mengirim plain text
"Notifikasi dari Arif R D!" // Pesan yang akan tampil "Notifikasi dari Kelompok 1 (Ariq, Dendi, Fazri)!" // Pesan yang akan tampil
) )
val request = Request.Builder() val request = Request.Builder()
.url(url) .url(url)
.addHeader("Title", "Alert")
.addHeader("Priority", "urgent")
.addHeader("Tags", "alert warning,rotating_light")
.post(requestBody) .post(requestBody)
.build() .build()
// Eksekusi request di thread terpisah // Eksekusi request di thread terpisah
Thread { Thread {
try { try {