ANDROID notification notification bar download control

Source: Internet
Author: User

Start a service that starts a notification in the service. The notification is downloaded.

multiple uses of Android notification

http://blog.csdn.net/loongggdroid/article/details/17616509

Android Multi-task download, use Notification update progress bar:

http://cn23snyga.iteye.com/blog/1902071

Android4.1: The notification bar displays clickable buttons-notification.builder Sample:

Http://blog.sina.com.cn/s/blog_7189b2fc010193at.html

Notification Implementation download progress display!

http://blog.csdn.net/jacklam200/article/details/7445990

notification use of the third: Update progress notification via service & Monitor Service progress in activity

http://blog.csdn.net/liuhe688/article/details/6623924

Android uses service services to create title bar notifications

Http://www.2cto.com/kf/201310/249934.html

Android Implementation service background download notification progress bar

http://blog.csdn.net/cynhafa/article/details/6613001

communication between Android service and activity and notification
    1. Activity registers a broadcast in OnCreate, which is used to update the message and OnStop when it is unregistered.

    2. Add a flag, change when activity is created and destroyed, and send notifications in service.

Ask
The 2nd is not very understand, also please detailed point!
Reply
    1. For example, if you define a global variable bool send_notification=false,activity is destroyed, it will send_notification=true. So you are in service, if send_notification=true send NOTIFICATION. This is a method.

    2. You can also register two broadcastreceiver, receive the same action, in fact, is an orderly broadcast. A registration at Activityoncreate, Activity ondestory (or OnStop) unregister, this broadcast to update the interface message, higher priority, update the interface in OnReceive Abortbroadcast , and then register a broadcast that sends notification, which has a lower priority, and can then use Context.sendorderedbroadcast to send an action broadcast. This way, if your interface is in the real world, a high-priority refresh message is called, and then abort is dropped. If your interface is no longer displayed, a low-priority send notification is called.

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.