diff --git a/app/src/main/java/io/atha/bababasic/ActivityMain.kt b/app/src/main/java/io/atha/bababasic/ActivityMain.kt index 3dc36ab..086bf41 100644 --- a/app/src/main/java/io/atha/bababasic/ActivityMain.kt +++ b/app/src/main/java/io/atha/bababasic/ActivityMain.kt @@ -497,6 +497,9 @@ GOTO eventLoop""" val examples = menu.findItem(R.id.examples_menu).subMenu!! EXAMPLES.forEach { (name, code) -> examples.add(name).setOnMenuItemClickListener { + firebaseAnalytics.logEvent("open", Bundle().apply { + putString("example", name) + }) setText(code, name) true } @@ -546,6 +549,7 @@ GOTO eventLoop""" val editor = binding.editor when (id) { R.id.open_file -> { + firebaseAnalytics.logEvent("open", null) val intent = Intent() .setType("text/plain") .putExtra(EXTRA_LOCAL_ONLY, true) @@ -561,6 +565,7 @@ GOTO eventLoop""" } R.id.save_file -> { + firebaseAnalytics.logEvent("save", null) val intent = Intent() .setType("text/plain") .putExtra(EXTRA_LOCAL_ONLY, true) @@ -580,6 +585,7 @@ GOTO eventLoop""" R.id.text_redo -> editor.redo() R.id.run_script -> { + firebaseAnalytics.logEvent("run_script", null) val text = editor.text.toString() try { checkSyntax("input.bas", text + "\n")