Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.util.Log;

public class Main {
    public static String LOG_TAG = null;

    /**
     * Print logcat message
     *
     * @param title the title of the log, this help to know where the log is from
     * @param message the message passed to be printed in logcat
     * */
    public static void printLog(String title, String message) {
        if (title == null)
            title = "NO TITLE";
        if (message != null) {
            LOG_TAG = "::::" + title;
            Log.i(LOG_TAG, message);
        } else {
            LOG_TAG = "::::" + " NULL TITLE";
            Log.i(LOG_TAG, " NULL MESSAGE");
        }
    }
}