Android Open Source - HexNanoController_Android Debug Handler

From Project

Back to project page HexNanoController_Android.


The source code is released under:

Code license GNU GPL v2 Content license CC BY-NC-SA 4.0

If you think the Android project HexNanoController_Android 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

 * //from   w  ww.ja  v  a 2s  . co m
 * @author Administrator
package com.hexairbot.hexmini.util;

import android.content.Context;
import android.util.Log;
import android.widget.Toast;

public class DebugHandler {

    public static Boolean debug = true;
    public static Boolean showServerSelect = false;

    public static void logd(String tag, String info) {
  if (debug)
      Log.d(tag, info);

    public static void logInsist(String tag, String info) {
  Log.d(tag, info);

    public static void logWithToast(Context context, String info, int duration) {
  logd(context.getPackageName(), info);
  Toast.makeText(context, info, duration).show();

Java Source Code List