From 082e8a8a138fdeb310f2dbc3248a360d0f164501 Mon Sep 17 00:00:00 2001 From: meiron03 Date: Tue, 5 Dec 2023 15:34:00 -0500 Subject: [PATCH] Get rid of analytics that we don't use. --- .../java/com/pennapps/labs/pennmobile/DiningFragment.kt | 6 ------ .../java/com/pennapps/labs/pennmobile/FlingFragment.kt | 6 ------ .../main/java/com/pennapps/labs/pennmobile/GsrFragment.kt | 6 ------ .../pennapps/labs/pennmobile/GsrReservationsFragment.kt | 6 ------ .../java/com/pennapps/labs/pennmobile/HomeFragment.kt | 5 ----- .../java/com/pennapps/labs/pennmobile/LaundryFragment.kt | 6 ------ .../pennapps/labs/pennmobile/LaundrySettingsFragment.kt | 8 -------- .../java/com/pennapps/labs/pennmobile/MainActivity.kt | 2 +- .../java/com/pennapps/labs/pennmobile/NewsFragment.kt | 6 ------ 9 files changed, 1 insertion(+), 50 deletions(-) diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/DiningFragment.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/DiningFragment.kt index d98b1e61..c37d1617 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/DiningFragment.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/DiningFragment.kt @@ -39,12 +39,6 @@ class DiningFragment : Fragment() { mActivity = activity as MainActivity mActivity.closeKeyboard() setHasOptionsMenu(true) - - val bundle = Bundle() - bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "1") - bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "Dining") - bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, "App Feature") - FirebaseAnalytics.getInstance(mActivity).logEvent(FirebaseAnalytics.Event.VIEW_ITEM, bundle) } override fun onActivityCreated(savedInstanceState: Bundle?) { diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/FlingFragment.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/FlingFragment.kt index 4608d640..13e15312 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/FlingFragment.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/FlingFragment.kt @@ -24,12 +24,6 @@ class FlingFragment : Fragment() { setHasOptionsMenu(true) mActivity = activity as MainActivity mActivity.supportActionBar?.setDisplayHomeAsUpEnabled(true) - - val bundle = Bundle() - bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "7") - bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "Spring Fling") - bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, "App Feature") - FirebaseAnalytics.getInstance(mActivity).logEvent(FirebaseAnalytics.Event.VIEW_ITEM, bundle) } override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/GsrFragment.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/GsrFragment.kt index f6e9c913..d1e5f3f1 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/GsrFragment.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/GsrFragment.kt @@ -81,12 +81,6 @@ class GsrFragment : Fragment() { // set default GSR selection date + time to the current date and time selectedDateTime = DateTime.now() - - val bundle = Bundle() - bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "0") - bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "GSR") - bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, "App Feature") - FirebaseAnalytics.getInstance(mActivity).logEvent(FirebaseAnalytics.Event.VIEW_ITEM, bundle) } override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/GsrReservationsFragment.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/GsrReservationsFragment.kt index 79c0a374..24d0aa86 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/GsrReservationsFragment.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/GsrReservationsFragment.kt @@ -34,12 +34,6 @@ class GsrReservationsFragment : Fragment() { mActivity = activity as MainActivity LocalBroadcastManager.getInstance(mActivity).registerReceiver(broadcastReceiver, IntentFilter("refresh")) - - val bundle = Bundle() - bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "10") - bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "GsrReservations") - bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, "App Feature") - FirebaseAnalytics.getInstance(mActivity).logEvent(FirebaseAnalytics.Event.VIEW_ITEM, bundle) } override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/HomeFragment.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/HomeFragment.kt index d7f1e882..0da25263 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/HomeFragment.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/HomeFragment.kt @@ -51,11 +51,6 @@ class HomeFragment : Fragment() { .getInstance(mActivity) .registerReceiver(broadcastReceiver, IntentFilter("refresh")) - val bundle = Bundle() - bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "11") - bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "Home") - bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, "App Feature") - FirebaseAnalytics.getInstance(mActivity).logEvent(FirebaseAnalytics.Event.VIEW_ITEM, bundle) } override fun onCreateView( diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/LaundryFragment.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/LaundryFragment.kt index 7f34d89d..2b90426a 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/LaundryFragment.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/LaundryFragment.kt @@ -56,12 +56,6 @@ class LaundryFragment : Fragment() { mActivity = activity as MainActivity mContext = mActivity setHasOptionsMenu(true) - - val bundle = Bundle() - bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "3") - bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "Laundry") - bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, "App Feature") - FirebaseAnalytics.getInstance(mContext).logEvent(FirebaseAnalytics.Event.VIEW_ITEM, bundle) } override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/LaundrySettingsFragment.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/LaundrySettingsFragment.kt index f48a172a..7f93e5a4 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/LaundrySettingsFragment.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/LaundrySettingsFragment.kt @@ -43,12 +43,6 @@ class LaundrySettingsFragment : Fragment() { setHasOptionsMenu(true) mActivity.toolbar.visibility = View.VISIBLE mActivity.hideBottomBar() - - val bundle = Bundle() - bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "12") - bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "Laundry Settings") - bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, "App Feature") - FirebaseAnalytics.getInstance(mContext).logEvent(FirebaseAnalytics.Event.VIEW_ITEM, bundle) } override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { @@ -69,8 +63,6 @@ class LaundrySettingsFragment : Fragment() { for (i in 0 until numRooms) { editor?.remove(i.toString())?.apply() } - - //view.laundry_building_expandable_list?.setAdapter(mAdapter) } // set up back button diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/MainActivity.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/MainActivity.kt index 2578be1f..f136af0b 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/MainActivity.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/MainActivity.kt @@ -93,7 +93,7 @@ class MainActivity : AppCompatActivity() { supportActionBar?.setDisplayShowTitleEnabled(false) mFirebaseAnalytics = FirebaseAnalytics.getInstance(this); - mFirebaseAnalytics.logEvent("MainActivity", null) + mFirebaseAnalytics.logEvent("MainActivityStart", null) // Show HomeFragment if logged in, otherwise show LoginFragment val pennKey = mSharedPrefs.getString(getString(R.string.pennkey), null) diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/NewsFragment.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/NewsFragment.kt index e065488f..c3b1ced2 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/NewsFragment.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/NewsFragment.kt @@ -139,13 +139,7 @@ class NewsFragment : ListFragment() { mActivity.closeKeyboard() setHasOptionsMenu(true) - val bundle = Bundle() - bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "5") - bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "News") - bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, "App Feature") - FirebaseAnalytics.getInstance(mActivity).logEvent(FirebaseAnalytics.Event.VIEW_ITEM, bundle) sharedPreferences = PreferenceManager.getDefaultSharedPreferences(mActivity) - } override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {