package com.algobase.share.app; import android.content.Context; import android.content.pm.PackageManager; import android.content.pm.PackageInfo; import android.content.pm.ApplicationInfo; import android.app.Application; /* import androidx.multidex.MultiDex; import androidx.multidex.MultiDexApplication; public class MyApplication extends MultiDexApplication */ public class MyApplication extends Application { GlobalExceptionHandler exception_handler; /* @Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(this); } */ @Override public void onCreate() { super.onCreate(); String app_label = "App"; try { PackageManager pm = getPackageManager(); PackageInfo pi = pm.getPackageInfo(getPackageName(),0); app_label = pi.applicationInfo.loadLabel(pm).toString(); } catch(Exception ex) {} exception_handler = new GlobalExceptionHandler(this,app_label); exception_handler.setLog1File("log/logfile.txt"); exception_handler.setLog2File("log/service_log.txt"); Thread.setDefaultUncaughtExceptionHandler(exception_handler); } }