`
alex09
  • 浏览: 974879 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Declaring the Background Tasks You Support

 
阅读更多
Support for some types of background execution must be declared in advance by the application that uses them. An application declares this support by including the UIBackgroundModes key in its Info.plist file. Its value is an array that contains one or more strings with the following values:

audio. The application plays audible content to the user while in the background. (This includes streaming audio or video content using AirPlay.)
location. The application keeps users informed of their location, even while running in the background.
voip. The application provides the ability for the user to make phone calls using an Internet connection.
Each of the preceding values lets the system know that your application should be woken up at appropriate times to respond to relevant events. For example, an application that begins playing music and then moves to the background still needs execution time to fill the audio output buffers. Including the audio key tells the system frameworks that they should continue playing and make the necessary callbacks to the application at appropriate intervals. If the application does not include this key, any audio being played by the application stops when the application moves to the background.

In addition to the preceding keys, iOS provides two other ways to do work in the background:

Task completion—Applications can ask the system for extra time to complete a given task.
Local notifications—Applications can schedule local notifications to be delivered at a predetermined time.
For more information about how to initiate background tasks from your code, see “Implementing Long-Running Background Tasks.”
分享到:
评论

相关推荐

    The Art of Assembly Language Programming

    You are visitor as of October 17, 1996. The Art of Assembly Language Programming <br>Forward Why Would Anyone Learn This Stuff? 1 What's Wrong With Assembly Language 2 What's Right With ...

    JSP Simple Examples

    In Jsp also we can set the background color which we want, the font color can be changed. The table can be coloured . By using the colors code we can give colors according to our wish. Sine Table in...

    IOS5 Programming Cookbook

    - **Method Overloading**: Objective-C does not support method overloading in the traditional sense. However, you can achieve similar functionality using optional parameters or different argument types...

    matlab7.3金融工具箱使用方法

    matlab7.3金融工具箱使用方法 What Is the Financial Toolbox?... You just write expressions the way you think of problems. There is no need to switch tools, convert files, or rewrite applications.

    Sakemail

    Now is more easy for you if you want hack/modify the code.- Better treatment of emails with html inside.15/12/971.4- Added support for UUCoded attachments.- Added a small delay when sending the email...

    Troubleshooting.Xcode.1484215613

    If you’ve struggled in the past to make Xcode work as expected, to solve problems that defy logic, and to understand Xcode’s misleading or cryptic error messages and unexpected crashes, ...

    professional.Android.Application.Development.2009.pdf

    Declaring and Enforcing Permissions 355 Enforcing Permissions with Broadcasting Intents 355 xiv Contents Using AIDL to Support IPC for Services 356 Implementing an AIDL Interface 356 Using ...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    (One exception is if an argument Foo or const Foo& has a non-explicit, one-argument constructor, in which case we need the full definition to support automatic type conversion.) We can declare ...

    jquery插件---slideViewer

    But if you can't live without declaring your images size, slideViewer will use your declared dimensions. Pretty flexible. How many galleries per page? As much as you like. slideViewer will instantly...

    as_extensions_flash_lite_digital_home

    allowing developers to access device-specific features or perform complex tasks that are not natively supported by the core ActionScript language. #### Tasks to Create an ActionScript Extension ...

    thymeleaf-extras-eclipse-plugin-2.1-master.zip

    autocompletion of what you've entered so far if it matches only one result (both of these can be invoked manually using CTRL+SPACE), and help text when hovering the cursor over a Thymeleaf processor....

    Winform和net的结合

    First, create a function to handle downloading of a file from the web. My example is like this: UINT InternetGetFile (HINTERNET IN ... I begin the body of the function declaring some variables.

    Windows Presentation Foundation

    Programming Windows Presentation Foundation By Ian Griffiths, Chris Sells ... an XML-based markup language (XAML) for declaring the structure of your Windows UI; and a radical new model for controls

    Seamless R and C++ Integration

    Rcpp attributes provide a high-level syntax for declaring C++ functions as callable from R and automatically generating the code required to invoke them. Attributes are intended to facilitate both ...

Global site tag (gtag.js) - Google Analytics