override fun onCreateSliceProvider(): Boolean = true override fun onBindSlice(sliceUri: Uri): Slice? = when (sliceUri.path) { path -> { context.startService(Intent(context, CryptoService::class.java)) createCryptoSlice(sliceUri) } else -> null } private fun createCryptoSlice(sliceUri: Uri): Slice? = ListBuilder(context, sliceUri, ListBuilder.INFINITY) .addGridRow { it.apply { addCell { it.apply { addImage(IconCompat.createWithResource(context, R.drawable.ic_bitcoin), SMALL_IMAGE) addTitleText("Bitcoin") addText(CryptoService.bitcoin, true) } } ... } } .build() }