package com.sipai.jspatrol.Application;

import android.app.Application;

import androidx.multidex.MultiDex;

import com.sipai.jspatrol.utils.CrashHandler;

import org.litepal.LitePal;
import org.litepal.LitePalApplication;
import org.xutils.x;

/**
 * created by lvliming on 2020/3/23
 */
public class App extends LitePalApplication {

    private double latitude;
    private double longitude;

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }
    private static App instance;

    public static App getInstance(){
        if (instance == null){

        }
        return instance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        //全局捕捉异常
        CrashHandler crashHandler = CrashHandler.getInstance();
        crashHandler.init(getApplicationContext());
        x.Ext.init(this);
        x.Ext.setDebug(false);
        MultiDex.install(this);
//        LitePal.initialize(this);
    }
}
