Ejemplo n.º 1
0
 private void logUser() {
   // TODO: Use the current user's information
   // You can call any combination of these three methods
   Crashlytics.setUserIdentifier("12345");
   Crashlytics.setUserEmail("*****@*****.**");
   Crashlytics.setUserName("Test User");
 }
  @Override
  public void onLoginFinished(Intent errorIntent) {
    AuthenticatorHelper helper = App.get(this).getAuthenticatorHelper();
    boolean result = helper.hasAccount();
    boolean premiumMember = helper.getRestrictions().isPremiumMember();

    if (result) {
      //noinspection ConstantConditions
      Crashlytics.setUserName(helper.getAccount().name);
    }

    AnalyticsUtil.actionLogin(result, premiumMember);

    setResult(result ? RESULT_OK : RESULT_CANCELED);

    if (errorIntent != null) {
      startActivity(errorIntent);
      finish();
      return;
    }

    if (premiumMember) {
      finish();
      return;
    }

    BasicMembershipWarningDialogFragment.newInstance()
        .show(getFragmentManager(), BasicMembershipWarningDialogFragment.FRAGMENT_TAG);
  }
Ejemplo n.º 3
0
 /**
  * Used to upload the user name and identify to fabric for tracking
  *
  * @param userName The login user name, here is IM ID.
  * @param identify The unique identify login user, here is UUID.
  */
 public static void logUserInfo(String userName, String identify) {
   Crashlytics.setUserName(userName);
   Crashlytics.setUserIdentifier(identify);
 }
 @Override
 public void call(JSONArray args) throws JSONException {
   Crashlytics.setUserName(args.getString(0));
 }