Android Notification.Builder vs NotificationCompat.Builder [duplicate]

二次信任 提交于 2019-12-05 21:26:55

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.

depends on what you are trying to do and what OS version's your app is compatible with but in most cases you would want to use NotificationCompat because that provides backwards compatibility where as if you wanted to provide that with the regular Notification.Builder you would have to check what OS version the device has yourself to use API calls that are not in older versions

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