Why is NotificationCompat needed?

一世执手 提交于 2019-12-01 04:29:26

You can use things like NotificationCompat.Builder#setLargeIcon(Bitmap) to allow you to take full advantage of Android 3.0+ with things like the large icon, while maintaining compatibility on versions of Android prior to 3.0 that do not support such things.

Though its old question, now NotificationCompat can also be used to create wearable specific notifications. More information on this google's developer guide.

http://developer.android.com/training/wearables/notifications/creating.html

It allows you to use the NotificationCompat.Builder class, a compatibly version of Notification.Builder from API 11+. As its name suggests its an implementation of the builder pattern, which seems to be its main advantage over the pre Android 3.0 notifications.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!