好库网
package com.vanco.abplayer;

import com.vanco.abplayer.view.FileUtils;

import android.app.Application;
import android.content.Context;
import android.os.Environment;


public class ABPlayerApplication extends Application{
	private static ABPlayerApplication mApplication;

	/** OPlayer SD鍗$紦瀛樿矾寰?*/
	public static final String OPLAYER_CACHE_BASE = Environment.getExternalStorageDirectory() + "/oplayer";
	/** 瑙嗛鎴浘缂撳啿璺緞 */
	public static final String OPLAYER_VIDEO_THUMB = OPLAYER_CACHE_BASE + "/thumb/";
	/** 棣栨鎵弿 */
	public static final String PREF_KEY_FIRST = "application_first";

	@Override
	public void onCreate() {
		super.onCreate();
		mApplication = this;

		init();
	}

	private void init() {
		//鍒涘缓缂撳瓨鐩綍
		FileUtils.createIfNoExists(OPLAYER_CACHE_BASE);
		FileUtils.createIfNoExists(OPLAYER_VIDEO_THUMB);
	}

	public static ABPlayerApplication getApplication() {
		return mApplication;
	}

	public static Context getContext() {
		return mApplication;
	}

	/** 閿€姣?*/
	public void destory() {
		mApplication = null;
	}

}