TransferPreferences

  • TransferPreferences defines preferences and methods for retrieving transfer information.

  • It includes nested classes for BatteryUsage and NetworkType preferences.

  • Constants define specific values for battery usage and network type preferences, such as charging only, unknown, unrestricted, any network, unknown network, and WiFi only.

  • Public methods allow retrieval of battery usage, network preference, and whether roaming is allowed.

public interfaceTransferPreferences

Transfer preferences interface. Defines preference types and methods to retrieve preferences information.

Nested Class Summary

@interface TransferPreferences.BatteryUsageBattery usage preference values. 
@interface TransferPreferences.NetworkTypeNetwork type preference values. 

Constant Summary

int BATTERY_USAGE_CHARGING_ONLYTransfer allowed only in charging state.
int BATTERY_USAGE_UNKNOWNBattery usage preference is unknown.
int BATTERY_USAGE_UNRESTRICTEDBattery usage is unrestricted.
int NETWORK_TYPE_ANYAny network type is allowed.
int NETWORK_TYPE_UNKNOWNNetwork type preference is unknown.
int NETWORK_TYPE_WIFI_ONLYOnly WiFi networks are allowed.

Public Method Summary

abstract int
getBatteryUsagePreference()
Returns the battery usage preference.
abstract int
getNetworkPreference()
Returns the network type preference.
abstract boolean
isRoamingAllowed()
Returns whether roaming is allowed.

Constants

public static final intBATTERY_USAGE_CHARGING_ONLY

Transfer allowed only in charging state.

Constant Value:257

public static final intBATTERY_USAGE_UNKNOWN

Battery usage preference is unknown.

Constant Value:0

public static final intBATTERY_USAGE_UNRESTRICTED

Battery usage is unrestricted.

Constant Value:256

public static final intNETWORK_TYPE_ANY

Any network type is allowed.

Constant Value:1

public static final intNETWORK_TYPE_UNKNOWN

Network type preference is unknown.

Constant Value:0

public static final intNETWORK_TYPE_WIFI_ONLY

Only WiFi networks are allowed.

Constant Value:2

Public Methods

public abstract intgetBatteryUsagePreference()

Returns the battery usage preference.

public abstract intgetNetworkPreference()

Returns the network type preference.

public abstract booleanisRoamingAllowed()

Returns whether roaming is allowed.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-10-31 UTC.