Skip to content

Instantly share code, notes, and snippets.

@igorescodro
Last active March 24, 2021 13:02
Show Gist options
  • Save igorescodro/1d839bb24581386df19d10e8dccc67e2 to your computer and use it in GitHub Desktop.
Save igorescodro/1d839bb24581386df19d10e8dccc67e2 to your computer and use it in GitHub Desktop.
val taskDetailIntent = Intent(
Intent.ACTION_VIEW,
"https://example.com/task_id=${task.id}".toUri(),
context,
MainActivity::class.java
)
val pending: PendingIntent = TaskStackBuilder.create(context).run {
addNextIntentWithParentStack(taskDetailIntent)
getPendingIntent(REQUEST_CODE, PendingIntent.FLAG_UPDATE_CURRENT)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment