// Path: app/src/main/java/com/antest1/kcanotify/KcaConstants.java
// public static final String DB_KEY_STARTDATA = "key_startdata";
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaConstants.java
// public static final int KCANOTIFY_DB_VERSION = 5;
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaConstants.java
// public static final String PREF_KCA_LANGUAGE = "kca_language";
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUseStatConstant.java
// public final static String OPEN_TOOL = "OpenTool";
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUtils.java
// public static String getStringPreferences(Context ctx, String key) {
//     SharedPreferences pref = ctx.getSharedPreferences("pref", Context.MODE_PRIVATE);
//     try {
//         return String.valueOf(pref.getInt(key, 0));
//     } catch (Exception e) {
//         // Nothing to do
//     }
//     return pref.getString(key, "");
// }
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUtils.java
// public static void sendUserAnalytics(Context context, String event, JsonObject value) {
//     Bundle params = new Bundle();
//     FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(context);
//     if (value != null) {
//         for (String key: value.keySet()) {
//             params.putString(key, value.get(key).getAsString());
//         }
//     }
//     mFirebaseAnalytics.logEvent(event, params);
// }


import android.content.Intent;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import androidx.core.content.ContextCompat;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.util.Log;
import android.view.MenuItem;
import android.widget.LinearLayout;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import java.util.Locale;
import static com.antest1.kcanotify.KcaConstants.DB_KEY_STARTDATA;
import static com.antest1.kcanotify.KcaConstants.KCANOTIFY_DB_VERSION;
import static com.antest1.kcanotify.KcaConstants.PREF_KCA_LANGUAGE;
import static com.antest1.kcanotify.KcaUseStatConstant.OPEN_TOOL;
import static com.antest1.kcanotify.KcaUtils.getStringPreferences;
import static com.antest1.kcanotify.KcaUtils.sendUserAnalytics;
            sendUserAnalytics(getApplicationContext(), OPEN_TOOL.concat("ShipList"), null);
            Intent intent = new Intent(ToolsActivity.this, ShipInfoActivity.class);
            startActivity(intent);
        });

        view_equipment.setOnClickListener(view -> {
            sendUserAnalytics(getApplicationContext(), OPEN_TOOL.concat("EquipList"), null);
            Intent intent = new Intent(ToolsActivity.this, EquipmentInfoActivity.class);
            startActivity(intent);
        });

        view_droplog.setOnClickListener(view -> {
            sendUserAnalytics(getApplicationContext(), OPEN_TOOL.concat("DropLog"), null);
            Intent intent = new Intent(ToolsActivity.this, DropLogActivity.class);
            startActivity(intent);
        });

        view_reslog.setOnClickListener(view -> {
            sendUserAnalytics(getApplicationContext(), OPEN_TOOL.concat("ResourceLog"), null);
            Intent intent = new Intent(ToolsActivity.this, ResourceLogActivity.class);
            startActivity(intent);
        });

        view_akashi.setOnClickListener(view -> {
            sendUserAnalytics(getApplicationContext(), OPEN_TOOL.concat("AkashiList"), null);
            Intent intent = new Intent(ToolsActivity.this, AkashiActivity.class);
            startActivity(intent);
        });

        view_expcalc.setOnClickListener(view -> {
// Path: app/src/main/java/com/antest1/kcanotify/KcaConstants.java
// public static final String DB_KEY_STARTDATA = "key_startdata";
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaConstants.java
// public static final int KCANOTIFY_DB_VERSION = 5;
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaConstants.java
// public static final String PREF_KCA_LANGUAGE = "kca_language";
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUseStatConstant.java
// public final static String OPEN_TOOL = "OpenTool";
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUtils.java
// public static String getStringPreferences(Context ctx, String key) {
//     SharedPreferences pref = ctx.getSharedPreferences("pref", Context.MODE_PRIVATE);
//     try {
//         return String.valueOf(pref.getInt(key, 0));
//     } catch (Exception e) {
//         // Nothing to do
//     }
//     return pref.getString(key, "");
// }
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUtils.java
// public static void sendUserAnalytics(Context context, String event, JsonObject value) {
//     Bundle params = new Bundle();
//     FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(context);
//     if (value != null) {
//         for (String key: value.keySet()) {
//             params.putString(key, value.get(key).getAsString());
//         }
//     }
//     mFirebaseAnalytics.logEvent(event, params);
// }


// Path: app/src/main/java/com/antest1/kcanotify/ToolsActivity.java
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import androidx.core.content.ContextCompat;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.util.Log;
import android.view.MenuItem;
import android.widget.LinearLayout;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import java.util.Locale;
import static com.antest1.kcanotify.KcaConstants.DB_KEY_STARTDATA;
import static com.antest1.kcanotify.KcaConstants.KCANOTIFY_DB_VERSION;
import static com.antest1.kcanotify.KcaConstants.PREF_KCA_LANGUAGE;
import static com.antest1.kcanotify.KcaUseStatConstant.OPEN_TOOL;
import static com.antest1.kcanotify.KcaUtils.getStringPreferences;
import static com.antest1.kcanotify.KcaUtils.sendUserAnalytics;

            sendUserAnalytics(getApplicationContext(), OPEN_TOOL.concat("ShipList"), null);
            Intent intent = new Intent(ToolsActivity.this, ShipInfoActivity.class);
            startActivity(intent);
        });

        view_equipment.setOnClickListener(view -> {
            sendUserAnalytics(getApplicationContext(), OPEN_TOOL.concat("EquipList"), null);
            Intent intent = new Intent(ToolsActivity.this, EquipmentInfoActivity.class);
            startActivity(intent);
        });

        view_droplog.setOnClickListener(view -> {
            sendUserAnalytics(getApplicationContext(), OPEN_TOOL.concat("DropLog"), null);
            Intent intent = new Intent(ToolsActivity.this, DropLogActivity.class);
            startActivity(intent);
        });

        view_reslog.setOnClickListener(view -> {
            sendUserAnalytics(getApplicationContext(), OPEN_TOOL.concat("ResourceLog"), null);
            Intent intent = new Intent(ToolsActivity.this, ResourceLogActivity.class);
            startActivity(intent);
        });

        view_akashi.setOnClickListener(view -> {
            sendUserAnalytics(getApplicationContext(), OPEN_TOOL.concat("AkashiList"), null);
            Intent intent = new Intent(ToolsActivity.this, AkashiActivity.class);
            startActivity(intent);
        });

        view_expcalc.setOnClickListener(view -> {
            sendUserAnalytics(getApplicationContext(), OPEN_TOOL.concat("ExperienceCalc"), null);