TransferPreferences Enumeration
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Defines the list of preferences for background transfer requests.
Namespace: Microsoft.Phone.BackgroundTransfer
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
Syntax
Public Enumeration TransferPreferences
public enum TransferPreferences
<object property="enumerationValue" .../>
Members
Member name | Description | |
---|---|---|
None | Allow transfers only when the device is using external power and has a Wi-Fi connection. This is the default setting. | |
AllowCellular | Allow transfers when the device is connected to external power and has a Wi-Fi or cellular connection. | |
AllowBattery | Allow transfers when there is a Wi-Fi connection and the device is using battery or external power. | |
AllowCellularAndBattery | Allow transfers when the device is using battery or external power and has a Wi-Fi or cellular connection. |
Remarks
By default, background transfers that are submitted using the BackgroundTransferService will occur only when the device has a Wi-Fi connection and is connected to external power. Using the TransferPreferences property of the BackgroundTransferRequest class, you can specify that you prefer for downloads to occur when one or both of these conditions are not met. Setting this does not guarantee that transfers will occur under the preferred conditions.
Warning
Requesting for transfers to proceed when the device has only a cellular connection and is not connected to external power can result in negative user experiences, including shorter battery life and greater data usage charges. It is recommended that you use the default None setting.
Capabilities
If you use this API in your app, you must specify the following capabilities in the app manifest. Otherwise, your app might not work correctly or it might exit unexpectedly.
ID_CAP_NETWORKING |
Windows Phone 8, Windows Phone OS 7.1 |
For more info, see App capabilities and hardware requirements for Windows Phone 8.
Version Information
Windows Phone OS
Supported in: 8.1, 8.0, 7.1
Platforms
Windows Phone