diff --git a/PennMobile/build.gradle b/PennMobile/build.gradle index 8b258c76..a37d3b54 100644 --- a/PennMobile/build.gradle +++ b/PennMobile/build.gradle @@ -2,6 +2,7 @@ plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' id 'com.google.gms.google-services' + id("com.google.firebase.crashlytics") id 'jacoco' } @@ -42,6 +43,8 @@ dependencies { implementation(platform("com.google.firebase:firebase-bom:31.5.0")) implementation 'com.google.firebase:firebase-analytics' + implementation("com.google.firebase:firebase-crashlytics") + implementation 'androidx.multidex:multidex:2.0.1' implementation 'com.google.maps:google-maps-services:2.2.0' implementation 'org.jsoup:jsoup:1.16.2' 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 504d233f..d7f1e882 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/HomeFragment.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/HomeFragment.kt @@ -72,7 +72,9 @@ class HomeFragment : Fragment() { view.home_refresh_layout .setColorSchemeResources(R.color.color_accent, R.color.color_primary) view.home_refresh_layout - .setOnRefreshListener { getHomePage() } + .setOnRefreshListener { + getHomePage() + } initAppBar(view) return 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 22a488e6..f48a172a 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/LaundrySettingsFragment.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/LaundrySettingsFragment.kt @@ -67,7 +67,7 @@ class LaundrySettingsFragment : Fragment() { editor?.apply() for (i in 0 until numRooms) { - editor?.remove(Integer.toString(i))?.apply() + editor?.remove(i.toString())?.apply() } //view.laundry_building_expandable_list?.setAdapter(mAdapter) 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 e63b06b3..2578be1f 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/MainActivity.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/MainActivity.kt @@ -61,7 +61,7 @@ class MainActivity : AppCompatActivity() { val tokenMutex = Mutex() - private lateinit var firebaseAnalytics: FirebaseAnalytics + private lateinit var mFirebaseAnalytics: FirebaseAnalytics override fun onCreate(savedInstanceState: Bundle?) { setTheme(R.style.AppTheme) @@ -92,13 +92,8 @@ class MainActivity : AppCompatActivity() { showBottomBar() supportActionBar?.setDisplayShowTitleEnabled(false) - // firebase test - //Firebase.analytics.logEvent("log_thing", null) - //firebaseAnalytics.logEvent - - firebaseAnalytics = FirebaseAnalytics.getInstance(this); - firebaseAnalytics.logEvent("log_thing", null) - + mFirebaseAnalytics = FirebaseAnalytics.getInstance(this); + mFirebaseAnalytics.logEvent("MainActivity", null) // Show HomeFragment if logged in, otherwise show LoginFragment val pennKey = mSharedPrefs.getString(getString(R.string.pennkey), null) @@ -110,11 +105,6 @@ class MainActivity : AppCompatActivity() { } } - override fun onResume() { - super.onResume() - //showBottomBar() - } - private fun onExpandableBottomNavigationItemSelected() { expandable_bottom_bar.setOnNavigationItemSelectedListener { item -> val position = when (item.itemId) { diff --git a/build.gradle b/build.gradle index 20e1c1ca..0594e417 100644 --- a/build.gradle +++ b/build.gradle @@ -4,4 +4,5 @@ plugins { id 'com.android.library' version '8.0.2' apply false id 'org.jetbrains.kotlin.android' version '1.7.22' apply false id 'com.google.gms.google-services' version "4.4.0" apply false + id("com.google.firebase.crashlytics") version "2.9.9" apply false } \ No newline at end of file