TransferPreferences Stay organized with collections Save and categorize content based on your preferences.
Page Summary
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.
Transfer preferences interface. Defines preference types and methods to retrieve preferences information.
Nested Class Summary
| @interface | TransferPreferences.BatteryUsage | Battery usage preference values. | |
| @interface | TransferPreferences.NetworkType | Network type preference values. | |
Constant Summary
| int | BATTERY_USAGE_CHARGING_ONLY | Transfer allowed only in charging state. |
| int | BATTERY_USAGE_UNKNOWN | Battery usage preference is unknown. |
| int | BATTERY_USAGE_UNRESTRICTED | Battery usage is unrestricted. |
| int | NETWORK_TYPE_ANY | Any network type is allowed. |
| int | NETWORK_TYPE_UNKNOWN | Network type preference is unknown. |
| int | NETWORK_TYPE_WIFI_ONLY | Only 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.
public static final intBATTERY_USAGE_UNKNOWN
Battery usage preference is unknown.
public static final intBATTERY_USAGE_UNRESTRICTED
Battery usage is unrestricted.
public static final intNETWORK_TYPE_ANY
Any network type is allowed.
public static final intNETWORK_TYPE_UNKNOWN
Network type preference is unknown.
public static final intNETWORK_TYPE_WIFI_ONLY
Only WiFi networks are allowed.
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.