package top.littlerich.virtuallocation.common;

import android.app.Application;
import android.app.Service;
import android.os.Vibrator;

import com.baidu.mapapi.CoordType;
import com.baidu.mapapi.SDKInitializer;

import top.littlerich.virtuallocation.model.Gps;
import top.littlerich.virtuallocation.service.LocationService;

/**
 * Created by xuqingfu on 2017/4/15.
 */
public class AppApplication extends Application {
    public LocationService locationService;
    public Vibrator mVibrator;

    /**
     * 全局GPS
     */
    public static Gps mMockGps;

    static {
        mMockGps = Config.COMPANY;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        /***
         * 初始化定位sdk，建议在Application中创建
         */
        locationService = new LocationService(getApplicationContext());
        mVibrator = (Vibrator) getApplicationContext().getSystemService(Service.VIBRATOR_SERVICE);
        SDKInitializer.initialize(getApplicationContext());
        SDKInitializer.setCoordType(CoordType.BD09LL);
    }

}