`
alex09
  • 浏览: 968951 次
  • 性别: 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.”
分享到:
评论

相关推荐

    iOS Application Programming Guide

    Declaring the Background Tasks You Support 65 Implementing Long-Running Background Tasks 66 Tracking the User’s Location 66 Playing Background Audio 67 Implementing a VoIP Application 68 Completing a...

    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...

    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.14842156

    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, ...

    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...

    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....

    The C Cheat Sheet - An Introduction to Programming in C

    1.1 The main() Function 1.2 Include Files 1.3 Whitespace 1.4 The Preprocessor 1.4.1 The #define Directive 1.4.2 Comments 1.4.3 The #include Directive 1.4.4 The #ifdef/#else/#endif Directives 1.4.5...

    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.

    Mastering.Spring.Cloud

    Packt is searching for authors like you Preface Who this book is for What this book covers To get the most out of this book Download the example code files Conventions used Get in touch Reviews ...

    Scala for the Impatient 2nd (完整英文第二版 带书签)

    17.1 Running Tasks in the Future 248 17.2 Waiting for Results 250 17.3 The Try Class 251 17.4 Callbacks 251 17.5 Composing Future Tasks 252 17.6 Other Future Transformations 255 17.7 Methods in the ...

    IOS5 Programming Cookbook

    12.2 Completing a Long-Running Task in the Background 617 12.3 Receiving Local Notifications in the Background 621 12.4 Playing Audio in the Background 630 12.5 Handling Location Changes in the ...

    Cplusplus.CLI.Primer.For.NET.Development

    Visual Studio 2015 and earlier versions support C++/CLI if you program using an IDE. C++/CLI is unattractive, clumsy, and hard when compared to other modern languages that run on the .NET platform. ...

    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

    CSharp 3.0 With the .NET Framework 3.5 Unleashed(english)

    Why This Book Is for You 31 Organization and Goals 32 Part 1 Learning C# Basics 36 1 Introducing the .NET Platform 38 What Is .NET? 38 The Common Language Runtime (CLR) 40 The .NET Framework ...

Global site tag (gtag.js) - Google Analytics