Android Open Source - YourConsole App Module






From Project

Back to project page YourConsole.

License

The source code is released under:

MIT License

If you think the Android project YourConsole listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.akisute.yourconsole.app;
//w w w.  j a  v a 2s  . c  o m
import android.content.Context;

import com.akisute.yourconsole.app.dagger.DaggeredApplicationModule;
import com.akisute.yourconsole.app.dagger.ForApplication;
import com.akisute.yourconsole.app.dagger.ForInjecting;
import com.akisute.yourconsole.app.model.ConsoleListAdapter;
import com.akisute.yourconsole.app.model.LogcatRecordingManager;
import com.akisute.yourconsole.app.util.GlobalEventBus;
import com.akisute.yourconsole.app.util.GlobalPreference;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

@Module(
        includes = {
                DaggeredApplicationModule.class
        },
        injects = {
                // Activity, Fragment, Service (dynamically injected on create by Daggered classes using ObjectGraph.inject(), uses member injections)
                ConsoleViewerFragment.class,
                LogcatRecordingService.class,
                SaveIntentService.class

                // Model (statically injected recursively when ObjectGraph.inject() is called, uses constructor injections)
                // Usually models are not listed here
        }
)
public class AppModule {

    @Provides
    @Singleton
    GlobalEventBus provideGlobalEventBus() {
        return new GlobalEventBus();
    }

    @Provides
    @Singleton
    GlobalPreference provideGlobalPreference(@ForApplication Context context) {
        return new GlobalPreference(context);
    }

    @Provides
    LogcatRecordingManager provideLogcatRecordingManager(GlobalEventBus globalEventBus, GlobalPreference globalPreference) {
        return new LogcatRecordingManager(globalEventBus, globalPreference);
    }

    @Provides
    ConsoleListAdapter provideConsoleListAdapter(@ForInjecting Context context) {
        return new ConsoleListAdapter(context);
    }
}




Java Source Code List

com.akisute.yourconsole.app.AppModule.java
com.akisute.yourconsole.app.Application.java
com.akisute.yourconsole.app.ConsoleViewerFragment.java
com.akisute.yourconsole.app.LogcatRecordingService.java
com.akisute.yourconsole.app.MainActivity.java
com.akisute.yourconsole.app.SaveIntentService.java
com.akisute.yourconsole.app.dagger.DaggeredActivity.java
com.akisute.yourconsole.app.dagger.DaggeredApplicationModule.java
com.akisute.yourconsole.app.dagger.DaggeredApplication.java
com.akisute.yourconsole.app.dagger.DaggeredFragment.java
com.akisute.yourconsole.app.dagger.DaggeredIntentService.java
com.akisute.yourconsole.app.dagger.DaggeredService.java
com.akisute.yourconsole.app.dagger.ForApplication.java
com.akisute.yourconsole.app.dagger.ForInjecting.java
com.akisute.yourconsole.app.helper.LogcatHelper.java
com.akisute.yourconsole.app.helper.RuntimeHelper.java
com.akisute.yourconsole.app.intent.Intents.java
com.akisute.yourconsole.app.model.ConsoleListAdapter.java
com.akisute.yourconsole.app.model.LogcatLine.java
com.akisute.yourconsole.app.model.LogcatRecordingManager.java
com.akisute.yourconsole.app.model.MText.java
com.akisute.yourconsole.app.reader.LogcatReader.java
com.akisute.yourconsole.app.reader.SingleLogcatReader.java
com.akisute.yourconsole.app.util.GlobalEventBus.java
com.akisute.yourconsole.app.util.GlobalPreference.java