Notifications Tutorial Part 2 - ACTION BUTTONS & COLOR - Android Studio Tutorial

Publicado el: 13 mayo 2018
en el canal de: Coding in Flow
102,160
1.2k

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


En esta página del sitio puede ver el video en línea Notifications Tutorial Part 2 - ACTION BUTTONS & COLOR - Android Studio Tutorial de Duración hora minuto segunda en buena calidad , que subió el usuario Coding in Flow 13 mayo 2018, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 102,160 veces y le gustó 1.2 mil a los espectadores. Disfruta viendo!