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.app.Activity;
import android.util.Log;
import android.widget.Toast;

public class Main {
    private static final String TAG = "activity";

    public static void showException(Activity activity, String msg, Throwable e) {
        e.printStackTrace();

        String s = String.format("%s: %s", msg, e.getMessage());
        showToast(activity, s);
        Log.e(TAG, s);
    }

    public static void showToast(Activity activity, String msg) {
        String s = String.format("PhotoNote: %s", msg);
        Toast.makeText(activity, s, Toast.LENGTH_LONG).show();
    }
}