Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.location.LocationManager;

import android.util.Log;

public class Main {
    public static boolean displayNetworkStatus(LocationManager locManager) {
        boolean ntw_enabled = false;
        try {
            ntw_enabled = locManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
        } catch (Exception ex) {
            Log.i("NetworkStatus", "checking NetworkStatus throws error " + ex);
        }
        return ntw_enabled;
    }
}