IOS 7 Background multitasking (multitasking) changes

Source: Internet
Author: User
Tags sleep

In short, the gadget is friendly to the developer, but unfriendly to the device (it may sneak up on traffic and electricity).

For users, if you have enough bandwidth and are not sensitive to heat, you will get a better application experience.

Starting with IOS 4, applications can continue to run for a short period of time (10 minutes) after retreating to the background.

In addition, you can declare yourself as needing to run in the background, you can run it without limit. But limited to playing music, using GPS and so on. It is worth mentioning that some applications in order to achieve the background is not limited to the purpose of running, in the background to play silent music (audit will not necessarily be found).

IOS 5 begins with one more type: downloading newspapers and magazines.

Then IOS 7 can download a variety of gadgets and timed crawls.

For developers, however, there are 2 other differences that need to be noted for IOS 7:

iOS 7 before the application into the background to continue to run, if the user locked the screen, then iOS will wait for the application to run out of the sleep state.

On IOS 7, the system will go to sleep quickly, and the backend apps will be suspended. If an event is awakened (such as a timed event, push, location update, etc.), the background application will continue to run for a while.

Because the process becomes intermittent, the download also uses Nsurlsession to process (that is, the Background Transfer Service below).

Because of the existence of app switcher, even in the background, users can still see it before exiting the snapshot. If there is something not to see people (such as just photos of the photos, the hot chat content, the bank card password or something), the interface to hide it.

By the way, let's introduce three new things:

Background Fetch. You can set the application to crawl the updates at least once in the background (note that this is not guaranteed to be achieved at least). For example, if a user's microblog is commented, IOS 7 has to have the microblogging server push a notice, the user receives the post, enters the tweet, waits for the comment to be loaded, and IOS 7 allows the user to check for updates at regular intervals (such as a minute) and to download the updated content. , and then send a local notification to the user, the user received after the entry into the micro-blog, display in the background to download good comment content. Even timeline can update you in advance if you need to.

It is clear that this practice is better to experience, but more cost of flow and battery.

Silent Remote Notification. Pre-IOS 7 push will pop up a dialog box directly, user confirmation will not enter the application, and IOS 7 can not pop-up dialog box, but directly notify the application to download updates, and so on after the next send local notification to the user, so that users into the application, you can see the updated content directly.

This approach is better than the former, do not need to poll in the background. Only users who are not interested in the updated content will be forced to download it.

In order to avoid being abused, this kind of push has the frequency limit (several times per hour), therefore pushes the QQ, the micro-letter this kind of often is brushed the news to be sure to have no.

Background Transfer Service. IOS 7 applications can continue to run in the background for a period of time to download, but if for a variety of reasons for the application is exited (by the user killed, not enough memory or timeout was killed by the system, etc.), then download is not guaranteed. The IOS 7 Background transfer service allows the system to download, make a mistake or notify and wake up the application to process.

The advantage for users is that when you want to cache the movie offline, you can let the application of Youku and so on in the background to download, put some music to see the comics, rather than innocently open the cool waiting to finish. Upload of course also support, the base friends no longer need to worry you do not have time to send a small movie or something. In addition, the background downloads mentioned in 1 and 2 will also use 3.

To avoid wasting traffic, the service is only transmitted in a WiFi environment.

Special attention should be paid to: when the application is awakened by the above three classes, it is given only a few seconds to process the update.

To sum up, I predict that the next generation of IPhone standby time will be reduced, the actual available time is reduced, but the official nominal usage time is unchanged.

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/extra/

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.