use of com.kickstarter.libs.utils.ApplicationLifecycleUtil in project android-oss by kickstarter.
the class KSApplication method onCreate.
@Override
@CallSuper
public void onCreate() {
super.onCreate();
// Send crash reports in release builds
if (!BuildConfig.DEBUG && !isInUnitTests()) {
checkForCrashes();
}
MultiDex.install(this);
// Only log for internal builds
if (BuildConfig.FLAVOR_AUDIENCE.equals("internal")) {
Timber.plant(new Timber.DebugTree());
}
if (!isInUnitTests() && ApiCapabilities.canDetectMemoryLeaks()) {
refWatcher = LeakCanary.install(this);
}
JodaTimeAndroid.init(this);
component = DaggerApplicationComponent.builder().applicationModule(new ApplicationModule(this)).build();
component().inject(this);
CookieHandler.setDefault(cookieManager);
FacebookSdk.sdkInitialize(this);
pushNotifications.initialize();
final ApplicationLifecycleUtil appUtil = new ApplicationLifecycleUtil(this);
registerActivityLifecycleCallbacks(appUtil);
registerComponentCallbacks(appUtil);
}
Aggregations