use of com.waz.zclient.controllers.tracking.events.exception.ExceptionEvent in project wire-android by wireapp.
the class MainActivity method onNewIntent.
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
if (IntentUtils.isPasswordResetIntent(intent)) {
onPasswordWasReset();
}
injectJava(GlobalTrackingController.class).appLaunched(intent);
String appCrash = getControllerFactory().getUserPreferencesController().getCrashException();
String appCrashDetails = getControllerFactory().getUserPreferencesController().getCrashDetails();
if (appCrash != null) {
Event exceptionEvent = ExceptionEvent.exception(appCrash, appCrashDetails);
injectJava(GlobalTrackingController.class).tagEvent(exceptionEvent);
}
setIntent(intent);
String page = intent.getStringExtra(LaunchActivity.APP_PAGE);
if (page == null || TextUtils.isEmpty(page)) {
return;
}
setIntent(IntentUtils.resetAppPage(intent));
switch(page) {
case IntentUtils.LOCALYTICS_DEEPLINK_SEARCH:
case IntentUtils.LOCALYTICS_DEEPLINK_PROFILE:
restartAppWithPage(page);
break;
case IntentUtils.LOCALYTICS_DEEPLINK_SETTINGS:
startActivity(ZetaPreferencesActivity.getDefaultIntent(this));
break;
}
}
use of com.waz.zclient.controllers.tracking.events.exception.ExceptionEvent in project wire-android by wireapp.
the class MainActivity method onCreate.
@Override
@SuppressWarnings("PMD")
public void onCreate(final Bundle savedInstanceState) {
Timber.i("onCreate");
if (getActionBar() != null) {
getActionBar().hide();
}
super.onCreate(savedInstanceState);
injectJava(UiTrackingController.class);
//Prevent drawing the default background to reduce overdraw
getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
setContentView(R.layout.main);
if (LayoutSpec.isPhone(this)) {
ViewUtils.lockScreenOrientation(Configuration.ORIENTATION_PORTRAIT, this);
}
FragmentManager fragmentManager = getSupportFragmentManager();
initializeControllers();
if (savedInstanceState == null) {
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.add(R.id.fl__offline__container, ConnectivityFragment.newInstance(), ConnectivityFragment.TAG);
if (BuildConfig.SHOW_GRIDOVERLAY) {
fragmentTransaction.add(R.id.fl_main_grid, GridFragment.newInstance(), GridFragment.TAG);
}
fragmentTransaction.commit();
} else {
getControllerFactory().getNavigationController().onActivityCreated(savedInstanceState);
}
if (BuildConfigUtils.isHockeyUpdateEnabled() && !BuildConfigUtils.isLocalBuild(this)) {
HockeyCrashReporting.checkForUpdates(this);
}
injectJava(GlobalTrackingController.class).appLaunched(getIntent());
String appCrash = getControllerFactory().getUserPreferencesController().getCrashException();
String appCrashDetails = getControllerFactory().getUserPreferencesController().getCrashDetails();
if (appCrash != null) {
Event exceptionEvent = ExceptionEvent.exception(appCrash, appCrashDetails);
injectJava(GlobalTrackingController.class).tagEvent(exceptionEvent);
}
getControllerFactory().getLoadTimeLoggerController().appStart();
}
Aggregations