@@ -7,6 +7,7 @@ import android.content.Context
77import android.content.Intent
88import android.content.IntentFilter
99import android.os.Build
10+ import android.os.Handler
1011import android.os.IBinder
1112import androidx.annotation.RequiresApi
1213
@@ -21,7 +22,7 @@ class ForegroundService : Service() {
2122
2223 context = this
2324
24- var notifcation = Notifcation (context)
25+ var notifcation = Notification (context)
2526
2627 notifcation.createNotificationChannel()
2728
@@ -61,15 +62,22 @@ class ForegroundService : Service() {
6162
6263
6364 private fun onReceiveMessage (
64- notification : Notifcation ,
65+ notification : Notification ,
6566 pendingIntent : PendingIntent
6667 ) {
6768 broadcastReceiver = object : BroadcastReceiver () {
6869 override fun onReceive (context : Context , intent : Intent ) {
6970 notification.updateNotification(
70- " رمز " + intent.getStringExtra(" DATA" ),
71+ getString( R .string.secret) + intent.getStringExtra(" DATA" ),
7172 pendingIntent
7273 )
74+ var handler = Handler ()
75+ handler.postDelayed({
76+ notification.updateNotification(
77+ " " ,
78+ pendingIntent
79+ )
80+ }, 120000 )
7381 }
7482 }
7583 val mIntentFilter = IntentFilter ()
0 commit comments