package com.novoda.downloadmanager.demo;

import android.app.Application;
import android.os.Handler;
import android.os.Looper;

import com.facebook.stetho.Stetho;
import com.novoda.downloadmanager.DownloadManagerBuilder;
import com.novoda.downloadmanager.LiteDownloadManagerCommands;
import com.novoda.downloadmanager.PercentageBasedStorageRequirementRule;

public class DemoApplication extends Application {

    private volatile LiteDownloadManagerCommands liteDownloadManagerCommands;

    @Override
    public void onCreate() {
        super.onCreate();
        Stetho.initializeWithDefaults(this);
        createLiteDownloadManager();
    }

    private void createLiteDownloadManager() {
        Handler handler = new Handler(Looper.getMainLooper());

        liteDownloadManagerCommands = DownloadManagerBuilder
                .newInstance(this, handler, R.mipmap.ic_launcher_round)
                .withLogHandle(new DemoLogHandle())
                .withStorageRequirementRules(PercentageBasedStorageRequirementRule.withPercentageOfStorageRemaining(0.2f))
                .build();
    }

    public LiteDownloadManagerCommands getLiteDownloadManagerCommands() {
        return liteDownloadManagerCommands;
    }
}

@@ -156,16 +156,83 @@
 Stetho;%0A
+import com.novoda.downloadmanager.ByteBasedStorageRequirementRule;%0A
 import c
@@ -348,133 +348,126 @@
 ds;%0A
-import com.novoda.downloadmanager.PercentageBasedStorageRequirementRule;%0A%0Apublic class DemoApplication extends Application %7B%0A
+%0Apublic class DemoApplication extends Application %7B%0A%0A    private static final int TWO_HUNDRED_MB_IN_BYTES = 200000000;
 %0A   
@@ -1041,25 +1041,19 @@
 ntRules(
-Percentag
+Byt
 eBasedSt
@@ -1081,18 +1081,13 @@
 with
-Percentage
+Bytes
 OfSt
@@ -1105,12 +1105,31 @@
 ing(
-0.2f
+TWO_HUNDRED_MB_IN_BYTES
 ))%0A 

Add byte rule as application example.