Skip to content

Instantly share code, notes, and snippets.

Last active Jul 16, 2019
What would you like to do?
fun createSlice(sliceUri: Uri): Slice {
val activityAction = createActivityAction()
return list(context, sliceUri, INFINITY) {
row {
title = "Perform action in app"
primaryAction = activityAction
private fun createActivityAction(): SliceAction? {
return SliceAction.create(
context, 0, Intent(context,, 0
IconCompat.createWithResource(context, R.drawable.ic_launcher_foreground),
"Open App"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment