Progress Praktikum-1
This commit is contained in:
parent
86ba20f78c
commit
0bd6dfe8c0
@ -62,16 +62,20 @@ fun sendNotification(onResult: (String) -> Unit) {
|
||||
|
||||
val requestBody = RequestBody.create(
|
||||
"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()
|
||||
.url(url)
|
||||
.addHeader("Title", "Alert")
|
||||
.addHeader("Priority", "urgent")
|
||||
.addHeader("Tags", "alert warning,rotating_light")
|
||||
.post(requestBody)
|
||||
.build()
|
||||
|
||||
|
||||
|
||||
// Eksekusi request di thread terpisah
|
||||
Thread {
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user