Skip to content

Commit

Permalink
Add crashyltics.
Browse files Browse the repository at this point in the history
  • Loading branch information
meiron03 committed Dec 3, 2023
1 parent 501604f commit b21d5a7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
3 changes: 3 additions & 0 deletions PennMobile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

Expand Down Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit b21d5a7

Please sign in to comment.