0

I'm making a scheduler app that receive notification. I tries to make an action for notification, when it clicks it will go to my schedule page. I use navigation component to make this app, and the problem occur when i try to explicit deep-link to schedule page.

when i want to click home buttom navigation bar, i can't go to that place like it's not gonna happen.

enter image description here

but, when i click back button from schedule page, it'll navigate to home, and from that i was be able to click home button.

i think it's because the start destination change from home to schedule page, but im not sure.

here's my code:

val pendingIntent = NavDeepLinkBuilder(context)
            .setGraph(R.navigation.main_navgraph)
            .setDestination(R.id.action_schedule)
            .createPendingIntent()
        
        val builder = NotificationCompat.Builder(context, SCHEDULE_CHANNEL_ID)
            .setSmallIcon(R.drawable.ic_launcher_foreground)
            .setContentTitle(title)
            .setContentText(dateTime)
            .setSound(soundUri)
            .setContentIntent(pendingIntent)
            .setPriority(NotificationCompat.PRIORITY_HIGH) 

I appreciate all the help!

Kakaranara
  • 97
  • 2
  • 7

0 Answers0