package com.ahau.againstpestinfo.base;

import android.app.Activity;
import android.app.Application;
import android.content.Context;

import com.ahau.againstpestinfo.HttpProcessor.AsyncProcessor;
import com.ahau.againstpestinfo.HttpProcessor.HttpHelper;

/**
 * 注释:
 *
 * @author fanchunchun
 * @date 2018/4/20
 */

public class MyApplication extends Application {

    private static Context context;

    private static Activity activity;

    public static Activity getActivity() {
        return activity;
    }

    private static MyApplication instance;
    public static MyApplication getInstance() {
        return instance;
    }

    @Override
    public void onCreate() {
        super.onCreate();

        instance = this;

        context = getApplicationContext();

        HttpHelper.init(new AsyncProcessor());
    }

    public static Context getContext() {
        return context;
    }
}
