Jared Poelman
Design guide: http://developer.android.com/design/patterns/notifications.html
API guide: http://developer.android.com/guide/topics/ui/notifiers/notifications.html
NotificationCompat.Builder: http://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder.html
Notification.Builder: http://developer.android.com/reference/android/app/Notification.Builder.html
-
Builder Pattern
-
Notification UI
-
Android SDK version gating
Concurrency: https://docs.oracle.com/javase/tutorial/essential/concurrency/index.html
-
UI Thread
-
Atomicity
-
Shared Preferences
-
Synchronized
- Create a notification with an API level gated feature!
http://developer.android.com/reference/android/os/Build.html
- Create a Builder class!
https://en.wikipedia.org/wiki/Builder_pattern#Java_Example
- Challenge: Create a working example of deadlock!
https://en.wikipedia.org/wiki/Deadlock
- Challenge: Create a notification that displays an image from a URL!
Please submit the exit ticket here.
-
What is a notification id?
The id used to identify a notification to the Android system. It can be used to delete a notification. -
How is the UI thread different from other threads on Android?
Android applications are single-threaded by default. This thread is called the UI thread and manages all UI events. Non visible long-running or blocking tasks (e.g. network, database I/O) should be run in separate threads to avoid blocking the UI thread. -
Why would you use NotificationCompat instead of Notification?
To extend support for Notification API features to earlier API levels in backwards-compatible fashion