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(
|
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 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user