Lecture 13: Notifications Flashcards
One of the requirements for working with a foreground service is that it must provide some sort of ___
notification to te user that the service is running
Notifications don’t just let you know an app is running though, they provide ___
descriptive information, updates or even action shortcuts
Notifications can be ____ controlled by the user
independently
Notifications are organized into ___
Eah app may have one or more ___
channels
____ are designed to organization notifcations in ways that allow for user control over ___
- Notifications
- Specific types of notifcation
Channels can be created by ___ or ___, but they should be registered ____ on creation in both cases
- services
- activities
- immediately
The importance level declared for a channels defines how ___
intrusive a notification may be
More important notifications take up more ____ and may also have ___ or ___ cues as welll
- more visual spae
- audio
- vibration
What are the 3 levels of importance?
- IMPORTANCE_DEFAULT
- IMPORTANCE_HIGH
- IMPORTANCE_LOW
How do notifications with importance level IMPORTANCE_DEFAULT look?
Notifications appear everywhere and have audio cues, but are visually unobtrusive
How do notifications with importance level IMPORTANCE_HIGH look?
Notifications will visually show a tab and have an audio cue and may go full screen in some instances
How do notifications with importance level IMPORTANCE_LOW look?
Notifications will appear when the phone is locked or on the home screen and in the status bar but no audio cue
What is the anatomy of a notification?
- custom icon
- name of the app that generated the notification
- timestamp based on when notification was registered
- notification title
- notification body/content
Once we have a channel we can build notifications for that channel. The only tie between the two is the ___ integer must ___
- CHANNEL_ID
- match between the two
Once the builder object is set up we can call ___ to build the notification
build()
We can fetch the current NotifiationManager context and use it to ___
send the built notification to the system
Each notification must also have a ___ which is a ___ for each notification
- notification ID
- unique integer
The _____ object allows for many customizations of your notification
NotificationCompat.Builder
Notifications can be cancelled in multiple wars, the simplest is when a user cancels a notifcation by tapping on it when ___ is used
setAutoCancel(true)
You can use the ____ to manually cancel individual notifications by unique integer ID orr cancel all notifications made in the channel
NotificationManager
Notifications are builting using a ___ and then registered with the ___ assigned to their specific channel
- builder
- notification manager