Guest User

Untitled

a guest
Feb 16th, 2021
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. val notificationIntentCompleteOrder = Intent("com.app.pes.actions.close.order")
  2. notificationIntentCompleteOrder.flags = Intent.FLAG_ACTIVITY_CLEAR_TOP
  3. notificationIntentCompleteOrder.putExtra("oid", oid)
  4. notificationIntentCompleteOrder.action = "com.app.pes.actions.close.order"
  5.  
  6.  
  7. val pendingIntentClose = PendingIntent.getBroadcast(
  8. context,
  9. 0, notificationIntentCompleteOrder,
  10. 0
  11. )
  12.  
  13. mBuilder.setSmallIcon(R.drawable.ic_push)
  14. .setLargeIcon(BitmapFactory.decodeResource(context.resources, R.mipmap.ic_launcher))
  15. .setTicker(message)
  16. .setWhen(System.currentTimeMillis())
  17. .setContentTitle(title)
  18. .setContentText(message)
  19. .setStyle(NotificationCompat.BigTextStyle().bigText(message))
  20. .setPriority(NotificationCompat.PRIORITY_MAX)
  21. .addAction(R.drawable.ic_delete_white, "Завершить", pendingIntentClose)
  22. .addAction(R.drawable.ic_archive_white, "Подробности", pendingIntentDetails)
  23.  
  24. .setAutoCancel(true)
  25.  
  26.  
Advertisement
Add Comment
Please, Sign In to add comment