is Wap Network Connection - Android Network

Android examples for Network:Network Connection

Description

is Wap Network Connection

Demo Code


//package com.java2s;

import android.net.ConnectivityManager;
import android.net.NetworkInfo;

import android.text.TextUtils;

public class Main {
    private static boolean isWapNetwork(NetworkInfo networkInfo) {
        return isMobileNetwork(networkInfo)
                && !TextUtils.isEmpty(android.net.Proxy.getDefaultHost());
    }/*from   w  w  w. j av  a2  s.c o  m*/

    private static boolean isMobileNetwork(NetworkInfo networkInfo) {
        return networkInfo.getType() == ConnectivityManager.TYPE_MOBILE;
    }
}

Related Tutorials