I have a composable which triggers a notification. Is there a best practice in Compose for how to obtain the
Intent
for the notification’s
setContentIntent()
? I’m trying to avoid having the composable know about its host Activity. Clicking the notification will launch that Activity. I can think of a few things I could do:
• Pass in a lambda like
intent: () -> Intent
to invoke anytime I need an intent
• Pass in the Activity