Skip to content

Commit

Permalink
Get rid of analytics that we don't use.
Browse files Browse the repository at this point in the history
  • Loading branch information
meiron03 committed Dec 5, 2023
1 parent b21d5a7 commit 082e8a8
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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? {
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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? {
Expand Down

0 comments on commit 082e8a8

Please sign in to comment.