Returns if the currently active data network is metered. A network is
classified as metered when the user is sensitive to heavy data usage on
that connection. You should check this before doing large data transfers,
and warn the user or delay the operation until another network is
available.
if (Build.VERSION.SDK_INT >= 16) {
IMPL = new JellyBeanConnectivityManagerCompatImpl();
} else if (Build.VERSION.SDK_INT >= 13) {
IMPL = new HoneycombMR2ConnectivityManagerCompatImpl();
} else if (Build.VERSION.SDK_INT >= 8) {
IMPL = new GingerbreadConnectivityManagerCompatImpl();
} else {
IMPL = new BaseConnectivityManagerCompatImpl();
}
return IMPL.isActiveNetworkMetered(cm);