Android notification disappears after display

Source: Internet
Author: User
After studying the problem in the afternoon, I still saw the synchronization problem of the mckochi notebook. After a long time, his notice disappeared after the following. After a long time, I had to worry about it. Is it not reliable to use a thread, I found an API for one afternoon and wanted to find something useful, but I couldn't find it. Icationicationmanager notificationmanager = (notificationmanager) context. getsystemservice (Android. content. context. notification_service); Notification = new notification (R. drawable. icon, message, system. currenttimemillis (); pendingintent contentintent = pendingintent. getactivity (context, 0, new intent (), 0); notification. setlatesteventinfo (context, null, null, contentintent); notificati On. flags = notification. flag_auto_cancel; icationicationmanager. Y (123, notification); icationicationmanager. cancel (123); and then continue to drum up. At, I came up with it. I'll try again, notify, and then cancel. That's the effect. It feels good. Hey.
Notification

Well, many experts have explained this in detail.

Related Article

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.