MyApplication.java 1.02 KB
package com.whaty.nafmii;

import android.app.Application;

import com.polysoft.nafmii.utils.CtxUtils;
import com.polysoft.nafmii.utils.ZipUtils;

import cn.jpush.android.api.JPushInterface;
import me.jessyan.autosize.AutoSizeConfig;
import ren.yale.android.cachewebviewlib.WebViewCacheInterceptor;
import ren.yale.android.cachewebviewlib.WebViewCacheInterceptorInst;

public class MyApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        CtxUtils.setApplication(this);
        AutoSizeConfig.getInstance()
                .setDesignWidthInDp(414)
                .setDesignHeightInDp(896);

        WebViewCacheInterceptor.Builder builder = new WebViewCacheInterceptor.Builder(this);
        builder.setDebug(BuildConfig.DEBUG);
        WebViewCacheInterceptorInst.getInstance().init(builder);

        JPushInterface.setDebugMode(BuildConfig.DEBUG);
        JPushInterface.init(this);

//        ExecutorUtils.io(() -> {
            ZipUtils.unZipDistAssets();
//        });
    }
}