use of com.crashlytics.android.answers.CustomEvent in project edx-app-android by edx.
the class AnswersAnalytics method trackEnrolmentSuccess.
@Override
public void trackEnrolmentSuccess(@NonNull String courseId, boolean emailOptIn) {
final CustomEvent event = new CustomEvent(Events.COURSE_ENROLL_SUCCESS);
AnswersEventUtil.setCustomProperties(event);
AnswersEventUtil.addCategoryToBiEvents(event, Values.CONVERSION, courseId);
event.putCustomAttribute(Keys.NAME, Values.USER_COURSE_ENROLL_SUCCESS).putCustomAttribute(Analytics.Keys.COURSE_ID, courseId).putCustomAttribute(Keys.EMAIL_OPT_IN, emailOptIn ? 1 : 0);
tracker.logCustom(event);
}
use of com.crashlytics.android.answers.CustomEvent in project androidApp by InspectorIncognito.
the class FabricLogger method log.
@Override
public void log(String eventName, Map<String, String> attributes) {
CustomEvent event = new CustomEvent(eventName);
attributes = attributes == null ? new HashMap<String, String>() : attributes;
for (String attributeKey : attributes.keySet()) {
event.putCustomAttribute(attributeKey, attributes.get(attributeKey));
}
Answers.getInstance().logCustom(event);
}
use of com.crashlytics.android.answers.CustomEvent in project Rutgers-Course-Tracker by tevjef.
the class SectionInfoPresenterImpl method toggleFab.
public void toggleFab() {
boolean sectionTracked = mDatabaseHandler.isSectionTracked(mSection.getRequest());
if (sectionTracked) {
removeSection(mSection.getRequest());
} else {
Answers.getInstance().logCustom(new CustomEvent("Tracked Section").putCustomAttribute("Subject", mSection.getCourse().getEnclosingSubject().getDescription()).putCustomAttribute("Course", mSection.getCourse().getTrueTitle()));
addSection(mSection.getRequest());
}
}
use of com.crashlytics.android.answers.CustomEvent in project Shuttle by timusus.
the class AnalyticsManager method logChangelogViewed.
public static void logChangelogViewed() {
if (!analyticsEnabled()) {
return;
}
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "changelog");
bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "0");
FirebaseAnalytics.getInstance(ShuttleApplication.getInstance()).logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);
Answers.getInstance().logCustom(new CustomEvent("Changelog Viewed"));
}
use of com.crashlytics.android.answers.CustomEvent in project quran_android by quran.
the class QuranDataActivity method onRequestPermissionsResult.
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
if (requestCode == REQUEST_WRITE_TO_SDCARD_PERMISSIONS) {
if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
/**
* taking a risk here. on nexus 6, the permission is granted automatically. on the emulator,
* a restart is required. on reddit, someone with a nexus 9 said they also didn't need to
* restart for the permission to take effect.
*
* going to assume that it just works to avoid meh code (a check to see if i can actually
* write, and a PendingIntent plus System.exit to restart the app otherwise). logging to
* know if we should actually have that code or not.
*
* also see:
* http://stackoverflow.com/questions/32471888/
*/
Answers.getInstance().logCustom(new CustomEvent("storagePermissionGranted"));
if (!canWriteSdcardAfterPermissions()) {
Answers.getInstance().logCustom(new CustomEvent("storagePermissionNeedsRestart"));
Toast.makeText(this, R.string.storage_permission_please_restart, Toast.LENGTH_LONG).show();
}
checkPages();
} else {
Answers.getInstance().logCustom(new CustomEvent("storagePermissionDenied"));
final File fallbackFile = getExternalFilesDir(null);
if (fallbackFile != null) {
quranSettings.setAppCustomLocation(fallbackFile.getAbsolutePath());
checkPages();
} else {
// set to null so we can try again next launch
quranSettings.setAppCustomLocation(null);
runListView();
}
}
}
}
Aggregations