Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.net.ConnectivityManager;

public class Main {
    public static final String UNKNOWN = "UNKNOWN";

    public static String convertActiveConnectivityType(int type) {
        switch (type) {
        case ConnectivityManager.TYPE_MOBILE:
            return "MOBILE";
        case ConnectivityManager.TYPE_WIFI:
            return "WiFi";
        default:
            return UNKNOWN;
        }
    }
}