Android Open Source - tdpforce Utils

From Project

Back to project page tdpforce.


The source code is released under:

Apache License

If you think the Android project tdpforce listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.telugudesam.cadre.util;
//w ww  . j  a v  a  2  s  . c o  m
import java.util.Set;

import android.content.Context;

import com.parse.ParseObject;

public class Utils {
  public static boolean isNetworkAvailable(Context context) {
    ConnectivityManager connectivityManager = (ConnectivityManager) context

    NetworkInfo wifiNetwork = connectivityManager
    if (wifiNetwork != null && wifiNetwork.isConnected()) {
      return true;

    NetworkInfo mobileNetwork = connectivityManager
    if (mobileNetwork != null && mobileNetwork.isConnected()) {
      return true;

    NetworkInfo activeNetwork = connectivityManager.getActiveNetworkInfo();
    if (activeNetwork != null && activeNetwork.isConnected()) {
      return true;

    return false;

  public static void printParseObject(ParseObject object) {
    Set<String> keys = object.keySet();
    L.d("parse object start");
    for (String key : keys) {
      L.d(key + " = " + object.get(key));
    L.d("parse object end");


Java Source Code List