use of com.crashlytics.android.answers.CustomEvent in project quran_android by quran.
the class BookmarkPresenter method toggleShowRecents.
public void toggleShowRecents() {
showRecents = !showRecents;
quranSettings.setShowRecents(showRecents);
requestData(false);
Answers.getInstance().logCustom(new CustomEvent(showRecents ? "showRecents" : "doNotMinimizeRecents"));
}
use of com.crashlytics.android.answers.CustomEvent in project DisasterApp by cutmail.
the class MainActivity method openPlayStore.
private void openPlayStore() {
Answers.getInstance().logCustom(new CustomEvent("Open PlayStore"));
try {
Uri uri = Uri.parse("market://details?id=me.cutmail.disasterapp");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
} catch (ActivityNotFoundException e) {
Timber.e(e, e.getMessage());
}
}
use of com.crashlytics.android.answers.CustomEvent in project SightRemote by TebbeUbben.
the class AlertService method onResult.
@Override
public void onResult(Object result) {
if (result instanceof ActiveAlertMessage) {
ActiveAlertMessage activeAlertMessage = (ActiveAlertMessage) result;
if (activeAlertMessage.getAlert() instanceof Error7ElectronicError) {
serviceConnector.disconnect();
return;
}
Alert alert = activeAlertMessage.getAlert();
if (alert == null) {
serviceConnector.disconnect();
return;
} else
serviceConnector.connect();
if (latestId != activeAlertMessage.getAlertID()) {
if (alertActivity != null)
alertActivity.finish();
if (activeAlertMessage.getAlertStatus() == AlertStatus.MUTED)
return;
latestId = activeAlertMessage.getAlertID();
Intent intent = new Intent(this, AlertActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra("alertMessage", SerializationUtils.serialize(activeAlertMessage));
startActivity(intent);
Answers.getInstance().logCustom(new CustomEvent("Active Alert").putCustomAttribute("Alert", alert.getClass().getSimpleName()));
} else if (alertActivity != null) {
alertActivity.setAlertMessage(activeAlertMessage);
alertActivity.update();
}
}
}
use of com.crashlytics.android.answers.CustomEvent in project SightRemote by TebbeUbben.
the class StatusActivity method onClick.
@Override
public void onClick(View v) {
if (StatusActivity.this.taskRunner != null)
StatusActivity.this.taskRunner.cancel();
handler.removeCallbacks(taskRunnerRunnable);
AppLayerMessage message = null;
if (v == tbrCancel) {
tbrCancel.setVisibility(View.GONE);
message = new CancelTBRMessage();
Answers.getInstance().logCustom(new CustomEvent("TBR Cancelled"));
} else if (v == bolus1Cancel) {
bolus1Cancel.setVisibility(View.INVISIBLE);
CancelBolusMessage cancelBolusMessage = new CancelBolusMessage();
cancelBolusMessage.setBolusId(statusResult.getActiveBolusesMessage().getBolus1().getBolusID());
message = cancelBolusMessage;
Answers.getInstance().logCustom(new CustomEvent("Bolus Cancelled"));
} else if (v == bolus2Cancel) {
bolus2Cancel.setVisibility(View.INVISIBLE);
CancelBolusMessage cancelBolusMessage = new CancelBolusMessage();
cancelBolusMessage.setBolusId(statusResult.getActiveBolusesMessage().getBolus2().getBolusID());
message = cancelBolusMessage;
Answers.getInstance().logCustom(new CustomEvent("Bolus Cancelled"));
} else if (v == bolus3Cancel) {
bolus3Cancel.setVisibility(View.INVISIBLE);
CancelBolusMessage cancelBolusMessage = new CancelBolusMessage();
cancelBolusMessage.setBolusId(statusResult.getActiveBolusesMessage().getBolus3().getBolusID());
message = cancelBolusMessage;
Answers.getInstance().logCustom(new CustomEvent("Bolus Cancelled"));
}
SingleMessageTaskRunner taskRunner = new SingleMessageTaskRunner(getServiceConnector(), message);
taskRunner.fetch(errorToastResultCallback);
handler.postDelayed(taskRunnerRunnable, 500);
}
use of com.crashlytics.android.answers.CustomEvent in project edx-app-android by edx.
the class AnswersAnalytics method trackRegistrationSuccess.
@Override
public void trackRegistrationSuccess(@NonNull String appVersion, @Nullable String source) {
final CustomEvent event = new CustomEvent(Events.REGISTRATION_SUCCESS);
AnswersEventUtil.setCustomProperties(event);
AnswersEventUtil.addCategoryToBiEvents(event, Values.CONVERSION, appVersion);
event.putCustomAttribute(Keys.NAME, Values.USER_REGISTRATION_SUCCESS);
if (!TextUtils.isEmpty(source)) {
event.putCustomAttribute(Keys.PROVIDER, source);
}
tracker.logCustom(event);
}
Aggregations