TransferPreferences Enumeration

July 28, 2014

Defines the list of preferences for background transfer requests.

Namespace:  Microsoft.Phone.BackgroundTransfer
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

public enum TransferPreferences
<object property="enumerationValue" .../>

Member nameDescription
NoneAllow transfers only when the device is using external power and has a Wi-Fi connection. This is the default setting.
AllowCellularAllow transfers when the device is connected to external power and has a Wi-Fi or cellular connection.
AllowBatteryAllow transfers when there is a Wi-Fi connection and the device is using battery or external power.
AllowCellularAndBatteryAllow transfers when the device is using battery or external power and has a Wi-Fi or cellular connection.

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.

Caution noteCaution:

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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2014 Microsoft