Code example for Notification

Methods: setLatestEventInfo

     * @param icon The id of a drawable to be used as the small icon. Will display on all platforms. 
     * @param thumb A bitmap representing the currently playing item. Ignored on lower API levels. 
     * @return 
    public Notification build(String title, String text, int icon, Bitmap thumb) {
        Notification notification = new Notification(icon, title, System.currentTimeMillis());
        notification.setLatestEventInfo(mContext, title, text, mIntent);
        return finalize(notification);
     * Perform modifications to a notification that apply to all API levels. All definitions of 
     * buildNotification should call this before returning. 
    protected Notification finalize(Notification notification) {
        notification.flags |= Notification.FLAG_ONGOING_EVENT;
        return notification;