Created
August 15, 2019 08:15
-
-
Save EfeBudak/2fe19f7aec45a933111f041011b014ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onReceive(context: Context?, intent: Intent?) { | |
context?.let { | |
Log.d("InteractiveNotificationBroadcastReceiver", "onReceive") | |
val notification = NotificationCompat.Builder(context, CHANNEL_ID) | |
.setSmallIcon(R.drawable.ic_launcher_foreground) | |
.setContentTitle("Interactive Notification Title") | |
.setContentText("MODIFIED text") | |
.setContentIntent(newPendingIntent(context)) | |
.build() | |
NotificationManagerCompat.from(context) | |
.notify(INTERACTIVE_NOTIFICATION_ID, notification) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment