Search in sources :

Example 6 with CustomEvent

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"));
}
Also used : CustomEvent(com.crashlytics.android.answers.CustomEvent)

Example 7 with CustomEvent

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());
    }
}
Also used : CustomEvent(com.crashlytics.android.answers.CustomEvent) ActivityNotFoundException(android.content.ActivityNotFoundException) Intent(android.content.Intent) Uri(android.net.Uri)

Example 8 with CustomEvent

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();
        }
    }
}
Also used : CustomEvent(com.crashlytics.android.answers.CustomEvent) ActiveAlertMessage(sugar.free.sightparser.applayer.messages.status.ActiveAlertMessage) Alert(sugar.free.sightparser.applayer.descriptors.alerts.Alert) Intent(android.content.Intent) Error7ElectronicError(sugar.free.sightparser.applayer.descriptors.alerts.Error7ElectronicError)

Example 9 with CustomEvent

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);
}
Also used : CustomEvent(com.crashlytics.android.answers.CustomEvent) AppLayerMessage(sugar.free.sightparser.applayer.messages.AppLayerMessage) CancelTBRMessage(sugar.free.sightparser.applayer.messages.remote_control.CancelTBRMessage) CancelBolusMessage(sugar.free.sightparser.applayer.messages.remote_control.CancelBolusMessage) SingleMessageTaskRunner(sugar.free.sightparser.handling.SingleMessageTaskRunner)

Example 10 with CustomEvent

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);
}
Also used : CustomEvent(com.crashlytics.android.answers.CustomEvent)

Aggregations

CustomEvent (com.crashlytics.android.answers.CustomEvent)28 Intent (android.content.Intent)6 Bundle (android.os.Bundle)3 HashMap (java.util.HashMap)3 Activity (android.app.Activity)2 ActivityNotFoundException (android.content.ActivityNotFoundException)2 Context (android.content.Context)2 Uri (android.net.Uri)2 AsyncTask (android.os.AsyncTask)2 AlertDialog (android.support.v7.app.AlertDialog)2 TextUtils (android.text.TextUtils)2 Toast (android.widget.Toast)2 Answers (com.crashlytics.android.answers.Answers)2 Sensor (com.eveningoutpost.dexdrip.Models.Sensor)2 StatsResult (com.eveningoutpost.dexdrip.stats.StatsResult)2 PermissionUtil (com.quran.labs.androidquran.service.util.PermissionUtil)2 QuranFileUtils (com.quran.labs.androidquran.util.QuranFileUtils)2 QuranScreenInfo (com.quran.labs.androidquran.util.QuranScreenInfo)2 QuranSettings (com.quran.labs.androidquran.util.QuranSettings)2 File (java.io.File)2