// Path: sample/src/main/java/net/derohimat/samplebasemvp/di/component/ApplicationComponent.java
// @Singleton
// @Component(modules = {ApplicationModule.class})
// public interface ApplicationComponent {
// 
//     void inject(MainPresenter mainPresenter);
// 
//     void inject(DetailPresenter detailPresenter);
// 
//     void inject(BaseApplication baseApplication);
// 
//     void inject(UnauthorisedInterceptor unauthorisedInterceptor);
// 
//     APIService apiService();
// 
//     EventBus eventBus();
// 
//     PreferencesHelper prefsHelper();
// 
// }
// 
// Path: sample/src/main/java/net/derohimat/samplebasemvp/di/module/ApplicationModule.java
// @Module
// public class ApplicationModule {
// 
//     private final BaseApplication mBaseApplication;
// 
//     public ApplicationModule(BaseApplication baseApplication) {
//         this.mBaseApplication = baseApplication;
//     }
// 
//     @Provides
//     @Singleton
//     public BaseApplication provideApplication() {
//         return mBaseApplication;
//     }
// 
//     @Provides
//     @Singleton
//     public APIService provideApiService() {
//         return APIService.Factory.create(mBaseApplication);
//     }
// 
//     @Provides
//     @Singleton
//     public EventBus eventBus() {
//         return new EventBus();
//     }
// 
//     @Provides
//     @Singleton
//     public PreferencesHelper prefsHelper() {
//         return new PreferencesHelper(mBaseApplication);
//     }
// 
// }
// 
// Path: sample/src/main/java/net/derohimat/samplebasemvp/events/AuthenticationErrorEvent.java
// public class AuthenticationErrorEvent {
//     public AuthenticationErrorEvent() {
//     }
// }


import android.app.Application;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.support.annotation.VisibleForTesting;
import net.derohimat.samplebasemvp.di.component.ApplicationComponent;
import net.derohimat.samplebasemvp.di.component.DaggerApplicationComponent;
import net.derohimat.samplebasemvp.di.module.ApplicationModule;
import net.derohimat.samplebasemvp.events.AuthenticationErrorEvent;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import javax.inject.Inject;
import rx.Scheduler;
import rx.schedulers.Schedulers;
import timber.log.Timber;
        }

        mApplicationComponent = DaggerApplicationComponent.builder().applicationModule(new ApplicationModule(this)).build();

        mApplicationComponent.inject(this);
        mEventBus.register(this);
    }

    public ApplicationComponent getApplicationComponent() {
        return mApplicationComponent;
    }

    @VisibleForTesting
    public void setApplicationComponent(ApplicationComponent applicationComponent) {
        this.mApplicationComponent = applicationComponent;
    }

    public Scheduler getSubscribeScheduler() {
        if (mScheduler == null) {
            mScheduler = Schedulers.io();
        }
        return mScheduler;
    }

    @Override
    public void onLowMemory() {
        super.onLowMemory();
        Timber.e("########## onLowMemory ##########");
    }

// Path: sample/src/main/java/net/derohimat/samplebasemvp/di/component/ApplicationComponent.java
// @Singleton
// @Component(modules = {ApplicationModule.class})
// public interface ApplicationComponent {
// 
//     void inject(MainPresenter mainPresenter);
// 
//     void inject(DetailPresenter detailPresenter);
// 
//     void inject(BaseApplication baseApplication);
// 
//     void inject(UnauthorisedInterceptor unauthorisedInterceptor);
// 
//     APIService apiService();
// 
//     EventBus eventBus();
// 
//     PreferencesHelper prefsHelper();
// 
// }
// 
// Path: sample/src/main/java/net/derohimat/samplebasemvp/di/module/ApplicationModule.java
// @Module
// public class ApplicationModule {
// 
//     private final BaseApplication mBaseApplication;
// 
//     public ApplicationModule(BaseApplication baseApplication) {
//         this.mBaseApplication = baseApplication;
//     }
// 
//     @Provides
//     @Singleton
//     public BaseApplication provideApplication() {
//         return mBaseApplication;
//     }
// 
//     @Provides
//     @Singleton
//     public APIService provideApiService() {
//         return APIService.Factory.create(mBaseApplication);
//     }
// 
//     @Provides
//     @Singleton
//     public EventBus eventBus() {
//         return new EventBus();
//     }
// 
//     @Provides
//     @Singleton
//     public PreferencesHelper prefsHelper() {
//         return new PreferencesHelper(mBaseApplication);
//     }
// 
// }
// 
// Path: sample/src/main/java/net/derohimat/samplebasemvp/events/AuthenticationErrorEvent.java
// public class AuthenticationErrorEvent {
//     public AuthenticationErrorEvent() {
//     }
// }


// Path: sample/src/main/java/net/derohimat/samplebasemvp/BaseApplication.java
import android.app.Application;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.support.annotation.VisibleForTesting;
import net.derohimat.samplebasemvp.di.component.ApplicationComponent;
import net.derohimat.samplebasemvp.di.component.DaggerApplicationComponent;
import net.derohimat.samplebasemvp.di.module.ApplicationModule;
import net.derohimat.samplebasemvp.events.AuthenticationErrorEvent;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import javax.inject.Inject;
import rx.Scheduler;
import rx.schedulers.Schedulers;
import timber.log.Timber;

        }

        mApplicationComponent = DaggerApplicationComponent.builder().applicationModule(new ApplicationModule(this)).build();

        mApplicationComponent.inject(this);
        mEventBus.register(this);
    }

    public ApplicationComponent getApplicationComponent() {
        return mApplicationComponent;
    }

    @VisibleForTesting
    public void setApplicationComponent(ApplicationComponent applicationComponent) {
        this.mApplicationComponent = applicationComponent;
    }

    public Scheduler getSubscribeScheduler() {
        if (mScheduler == null) {
            mScheduler = Schedulers.io();
        }
        return mScheduler;
    }

    @Override
    public void onLowMemory() {
        super.onLowMemory();
        Timber.e("########## onLowMemory ##########");
    }

    @Override