Android Development: Notification notifications and notifications do not show issues

Source: Internet
Author: User

I. Notification
        Pushmessagebutton = (Button) Findviewbyid (r.id.pushmessage);        Final Bitmap LargeIcon = ((bitmapdrawable) getresources (). getdrawable (R.drawable.stefan)). Getbitmap ();        Final Notificationmanager manager = (Notificationmanager) getsystemservice (Context.notification_service);  Pushmessagebutton.setonclicklistener (New View.onclicklistener () {@Override public void OnClick (View V) {pendingintent pendingintent = pendingintent.getactivity (baidumapactivity.this, 0, New Intent (). setact                Ion (Intent.action_view), 0); Notification notify= New Notification.builder (baidumapactivity.this). Setsmallicon (R.drawable.head_ image). Setlargeicon (LargeIcon). Setticker ("You have a new short message, please check!"). "). Setcontenttitle (" Notification Title "). Setcontenttext (" This is the Notif Ication message "). Setcontentintent (PendingIntent). Setnumber (1). GetNotification (); Notify.flags |= Notification.flag_auto_cancel;            FL manager.notify (1,notify); }        });
Two. Questions

No notification notifications are displayed.

three. Resolve

1. Please set icon

2. If the API is 16, replace getnotification () with Build (), refer to: http://blog.csdn.net/loongggdroid/article/details/17616509

Android Development: Notification notifications and notifications do not show issues

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.