If you think the Android project SysLog 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
/* SysLog - A simple logging tool
* Copyright (C) 2013-2014 Scott Warner <Tortel1210@gmail.com>
* //www.java2s.com
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/package com.tortel.syslog.dialog;
import android.app.Dialog;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import com.afollestad.materialdialogs.MaterialDialog;
import com.tortel.syslog.R;
/**
* Well, shit dialog. Called if the send email intent fails.
*/publicclass OhShitDialog extends DialogFragment {
privatestatic Throwable exception;
publicvoid setException(Throwable exception){
OhShitDialog.exception = exception;
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
builder.content(R.string.oh_shit_message);
builder.title(R.string.oh_shit_title);
builder.positiveText(R.string.close);
builder.callback(new MaterialDialog.ButtonCallback() {
@Override
publicvoid onPositive(MaterialDialog dialog) {
thrownew RuntimeException(exception);
}
});
return builder.build();
}
}