// Path: app/src/main/java/org/theotech/ceaselessandroid/util/AnalyticsUtils.java
// public class AnalyticsUtils {
// 
//     private static final String TAG = AnalyticsUtils.class.getSimpleName();
// 
//     public static void sendScreenViewHit(Activity activity, String name) {
//         Log.v(TAG, "Setting screen name: " + name);
//         FirebaseAnalytics.getInstance(activity).setCurrentScreen(activity, name, null /* class override */);
//     }
// 
//     public static void sendEventWithCategoryAndValue(Activity activity, String category, String action, String label, Long value) {
//         final Bundle params = new Bundle();
//         params.putString("category", category);
//         params.putString("action", action);
//         params.putString("label", label);
//         params.putLong("value", value);
//         FirebaseAnalytics.getInstance(activity).logEvent("ga_event", params);
//     }
// 
//     public static void sendEventWithCategory(Activity activity, String category, String action, String label) {
//         final Bundle params = new Bundle();
//         params.putString("category", category);
//         params.putString("action", action);
//         params.putString("label", label);
//         FirebaseAnalytics.getInstance(activity).logEvent("ga_event", params);
//     }
// }


import android.app.Fragment;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import org.theotech.ceaselessandroid.R;
import org.theotech.ceaselessandroid.util.AnalyticsUtils;
import butterknife.BindView;
import butterknife.ButterKnife;
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // set title
        getActivity().setTitle(getString(R.string.nav_about));

        // create view and bind
        View view = inflater.inflate(R.layout.fragment_help, container, false);
        ButterKnife.bind(this, view);

        aboutWV.getSettings().setJavaScriptEnabled(true);
        aboutWV.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView wv, String url) {
                if (url.startsWith("mailto:")) {
                    Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
                    startActivity(intent);
                    return true;
                } else {
                    return false;
                }
            }
        });
        aboutWV.loadUrl(getString(R.string.about_url));

        return view;
    }

    @Override
    public void onResume() {
        super.onResume();
// Path: app/src/main/java/org/theotech/ceaselessandroid/util/AnalyticsUtils.java
// public class AnalyticsUtils {
// 
//     private static final String TAG = AnalyticsUtils.class.getSimpleName();
// 
//     public static void sendScreenViewHit(Activity activity, String name) {
//         Log.v(TAG, "Setting screen name: " + name);
//         FirebaseAnalytics.getInstance(activity).setCurrentScreen(activity, name, null /* class override */);
//     }
// 
//     public static void sendEventWithCategoryAndValue(Activity activity, String category, String action, String label, Long value) {
//         final Bundle params = new Bundle();
//         params.putString("category", category);
//         params.putString("action", action);
//         params.putString("label", label);
//         params.putLong("value", value);
//         FirebaseAnalytics.getInstance(activity).logEvent("ga_event", params);
//     }
// 
//     public static void sendEventWithCategory(Activity activity, String category, String action, String label) {
//         final Bundle params = new Bundle();
//         params.putString("category", category);
//         params.putString("action", action);
//         params.putString("label", label);
//         FirebaseAnalytics.getInstance(activity).logEvent("ga_event", params);
//     }
// }


// Path: app/src/main/java/org/theotech/ceaselessandroid/fragment/AboutFragment.java
import android.app.Fragment;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import org.theotech.ceaselessandroid.R;
import org.theotech.ceaselessandroid.util.AnalyticsUtils;
import butterknife.BindView;
import butterknife.ButterKnife;

    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // set title
        getActivity().setTitle(getString(R.string.nav_about));

        // create view and bind
        View view = inflater.inflate(R.layout.fragment_help, container, false);
        ButterKnife.bind(this, view);

        aboutWV.getSettings().setJavaScriptEnabled(true);
        aboutWV.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView wv, String url) {
                if (url.startsWith("mailto:")) {
                    Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
                    startActivity(intent);
                    return true;
                } else {
                    return false;
                }
            }
        });
        aboutWV.loadUrl(getString(R.string.about_url));

        return view;
    }

    @Override
    public void onResume() {
        super.onResume();
        AnalyticsUtils.sendScreenViewHit(this.getActivity(), "AboutScreen");