MyApplication.java
1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.whaty.nafmii;
import android.app.Application;
import com.polysoft.nafmii.utils.CtxUtils;
import com.polysoft.nafmii.utils.ExecutorUtils;
import com.polysoft.nafmii.utils.ZipUtils;
import com.tencent.tauth.Tencent;
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(true);
JPushInterface.init(this);
ExecutorUtils.io(() -> {
ZipUtils.unZipDistAssets();
});
}
}