package com.liulishuo.filedownloader.demo;

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

import com.liulishuo.filedownloader.FileDownloader;
import com.liulishuo.filedownloader.util.FileDownloadLog;

/**
 * Created by Jacksgong on 12/17/15.
 */
public class DemoApplication extends Application {
    public static Context CONTEXT;
    @Override
    public void onCreate() {
        super.onCreate();
        // for demo
        CONTEXT = this;

        // 下面这句为了测试，正常使用的时候不用添加
        FileDownloadLog.NEED_LOG = BuildConfig.DOWNLOAD_NEED_LOG;

        // 不耗时，做一些简单初始化准备工作，不会启动下载进程
        FileDownloader.init(this);
    }
}

@@ -207,19 +207,172 @@
 Download
-Log
+Helper;%0Aimport com.liulishuo.filedownloader.util.FileDownloadLog;%0A%0Aimport java.net.Proxy;%0Aimport java.util.concurrent.TimeUnit;%0A%0Aimport okhttp3.OkHttpClient
 ;%0A%0A/**%0A 
@@ -497,16 +497,17 @@
 ONTEXT;%0A
+%0A
     @Ove
@@ -586,16 +586,17 @@
 for demo
+.
 %0A       
@@ -628,28 +628,51 @@
  // 
-%E4%B8%8B%E9%9D%A2%E8%BF%99%E5%8F%A5%E4%B8%BA%E4%BA%86%E6%B5%8B%E8%AF%95%EF%BC%8C%E6%AD%A3%E5%B8%B8%E4%BD%BF%E7%94%A8%E7%9A%84%E6%97%B6%E5%80%99%E4%B8%8D%E7%94%A8%E6%B7%BB%E5%8A%A0
+just for open the log in this demo project.
 %0A   
@@ -748,68 +748,824 @@
    /
-/ %E4%B8%8D%E8%80%97%E6%97%B6%EF%BC%8C%E5%81%9A%E4%B8%80%E4%BA%9B%E7%AE%80%E5%8D%95%E5%88%9D%E5%A7%8B%E5%8C%96%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C%EF%BC%8C%E4%B8%8D%E4%BC%9A%E5%90%AF%E5%8A%A8%E4%B8%8B%E8%BD%BD%E8%BF%9B%E7%A8%8B%0A        FileDownloader.init(this
+**%0A         * just for cache Application's Context, and ':filedownloader' progress will NOT be launched%0A         * by below code, so please do not worry about performance.%0A         * @see FileDownloader#init(Application)%0A         */%0A        FileDownloader.init(this,%0A                new FileDownloadHelper.OkHttpClientCustomMaker() %7B // is not must to provide.%0A                    @Override%0A                    public OkHttpClient customMake() %7B%0A                        // just for OkHttpClient customize.%0A                        final OkHttpClient.Builder builder = new OkHttpClient.Builder();%0A                        builder.connectTimeout(15_000, TimeUnit.MILLISECONDS);%0A                        builder.proxy(Proxy.NO_PROXY);%0A                        return builder.build();%0A                    %7D%0A                %7D
 );%0A 

add customize OkHttpClient demo #22