In part 2 of the notification tutorial, we will add a tap action to our notification that will open an activity, and we will add an action button that will trigger a BroadcastReceiver to execute some code in it's onReceive method.
In both cases we have to create an Intent and wrap it into a PendingIntent, which we pass to our NotificationCompat.Builder. We define the tap action with setContentIntent and add our action buttons with addAction.
Also we will change the color of our notification content with setColor and specify it's behavior with setAutoCancel and setOnlyAlertOnce.
Documentation about back stack & navigation:
https://developer.android.com/trainin...
https://developer.android.com/guide/c...
Watch the whole playlist:
• Playlist
Example code for this part:
https://gist.github.com/codinginflow/...
____________________
💻 Find the BEST programming tutorials on TutHub:
https://tuthub.io
⭐ Get my MVVM Caching Course now:
https://codinginflow.com/caching
❗ Subscribe to the channel:
/ codinginflo. .
📨 Subscribe to the Coding in Flow newsletter:
https://codinginflow.com/newsletter
❓ Join our free developer community:
/ discord
📣 Follow Coding in Flow on other sites:
Facebook: / codinginflow
Instagram: / codinginflow
TikTok: / codinginflow
Twitter: / codinginflow
Github: https://github.com/codinginflow
💰 Business requests, sponsoring, etc.: info@codinginflow.com
Nesta página do site você pode assistir ao vídeo on-line Notifications Tutorial Part 2 - ACTION BUTTONS & COLOR - Android Studio Tutorial duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Coding in Flow 13 Maio 2018, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 102,143 vezes e gostou 1.2 mil espectadores. Boa visualização!