public abstract class Connectivity extends Object
Modifier and Type | Field and Description |
---|---|
static Connectivity |
MOBILE
The device is connected to a mobile network (EDGE or 3G).
|
static Connectivity |
OFFLINE
The device is offline
|
static Connectivity |
WIRED
The device is connected to a wired network (for example, ethernet)
|
static Connectivity |
WIRELESS
The device is connected to a high-speed wireless network (WiFi)
|
Constructor and Description |
---|
Connectivity() |
Modifier and Type | Method and Description |
---|---|
static Connectivity |
fromNetworkType(int type)
Translate an Android connectivity type to a
Connectivity constant for use with the
SDK. |
public static final Connectivity OFFLINE
public static final Connectivity WIRED
public static final Connectivity WIRELESS
public static final Connectivity MOBILE
WIRELESS
is not so much speed as metered bandwidth.public static Connectivity fromNetworkType(int type)
Connectivity
constant for use with the
SDK. The value here is intended to be one given by a call to
NetworkInfo.getType()
. Note that in order to make this call, your
app must declare android.permission.ACCESS_NETWORK_STATEin its manifest.
type
- Network typeOFFLINE
in the case of
a network type it does not understand.SpotifyPlayer.setConnectivityStatus(com.spotify.sdk.android.player.Player.OperationCallback, Connectivity)