Back to project page iwannawatch-android.
The source code is released under:
MIT License
If you think the Android project iwannawatch-android 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.meoyawn.iwannawatch; /*from www .j a va2s . co m*/ import android.app.Application; import android.content.Context; import android.os.Environment; import com.crittercism.app.Crittercism; import org.jetbrains.annotations.NotNull; import java.io.File; import dagger.ObjectGraph; import timber.log.Timber; /** * Created by adel on 3/1/14 */ public class App extends Application { public static File getCacheDir(Context context) { boolean mounted = Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()); return mounted ? context.getExternalCacheDir() : context.getCacheDir(); } public static ObjectGraph getObjectGraph(Context context) { @NotNull App app = (App) context.getApplicationContext(); return app.objectGraph; } ObjectGraph objectGraph; @Override public void onCreate() { super.onCreate(); Crittercism.initialize(getApplicationContext(), "531378fa647e751a79000002"); Timber.plant(BuildConfig.DEBUG ? new Timber.DebugTree() : new CrashReportingTree()); objectGraph = ObjectGraph.create(new AppModule(this)); } }