Back to project page screenplay.
The source code is released under:
MIT License
If you think the Android project screenplay 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.davidstemmer.screenplay.sample.mortar; // w ww .ja va 2s .c o m import android.app.Application; import com.davidstemmer.screenplay.sample.mortar.module.ApplicationModule; import dagger.ObjectGraph; import mortar.Mortar; import mortar.MortarScope; /** * Created by weefbellington on 10/2/14. */ public class SampleApplication extends Application { private MortarScope applicationScope; @Override public void onCreate() { super.onCreate(); // Eagerly validate development builds (too slow for production). ObjectGraph rootGraph = ObjectGraph.create(new ApplicationModule(this)); applicationScope = Mortar.createRootScope(BuildConfig.DEBUG, rootGraph); } @Override public Object getSystemService(String name) { if (Mortar.isScopeSystemService(name)) { return applicationScope; } return super.getSystemService(name); } }