Notification 的基本操作主要有创建、更新、取消这三种。一个 Notification 的必要属性有三项,如果不设置则在运行时会抛出异常:
小图标,通过 setSmallIcon() 方法设置
标题,通过 setContentTitle() 方法设置
内容,通过 setContentText() 方法设置
Notification 的基本操作主要有创建、更新、取消这三种。一个 Notification 的必要属性有三项,如果不设置则在运行时会抛出异常:
小图标,通过 setSmallIcon() 方法设置
标题,通过 setContentTitle() 方法设置
内容,通过 setContentText() 方法设置