Back to project page android-unittesting.
The source code is released under:
Apache License
If you think the Android project android-unittesting listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.hp.mvp; //from w ww . ja va2 s . com import android.content.Context; import com.hp.mvp.data.DataProvider; import com.hp.mvp.data.SqlLiteProvider; import javax.inject.Singleton; import dagger.Module; import dagger.Provides; /** * Created by david on 5/4/14. */ @Module( injects = { MainPresenter.class } ) public class DataModule { private MainApplication application; private Context context; public DataModule(MainApplication app){ this.application = app; this.context = this.application.getApplicationContext(); } @Provides @Singleton DataProvider provideDataProvider(){ return new SqlLiteProvider(context); } }