Android Open Source - InfoOverlay Base Module






From Project

Back to project page InfoOverlay.

License

The source code is released under:

Apache License

If you think the Android project InfoOverlay 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.trevore.infooverlay;
/*  ww  w.ja va 2  s. c  o  m*/
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

/**
 * Created by trevor on 6/11/14.
 */
@Module(
        injects = {
                MainActivity.MainFragment.class,
                OverlayService.class
        }
)
public class BaseModule {

    private Context context;

    public BaseModule(Context context) {
        this.context = context.getApplicationContext();
    }

    @Provides
    @Singleton
    public SharedPreferences provideSharedPreferences() {
        return PreferenceManager.getDefaultSharedPreferences(context);
    }
}




Java Source Code List

com.trevore.infooverlay.BaseModule.java
com.trevore.infooverlay.MainActivity.java
com.trevore.infooverlay.MainApplication.java
com.trevore.infooverlay.OverlayService.java