mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
22 lines
548 B
Kotlin
22 lines
548 B
Kotlin
package com.geeksville.mesh.ui
|
|
|
|
import androidx.fragment.app.Fragment
|
|
import com.geeksville.android.GeeksvilleApplication
|
|
|
|
/**
|
|
* A fragment that represents a current 'screen' in our app.
|
|
*
|
|
* Useful for tracking analytics
|
|
*/
|
|
open class ScreenFragment(private val screenName: String) : Fragment() {
|
|
|
|
override fun onResume() {
|
|
super.onResume()
|
|
GeeksvilleApplication.analytics.sendScreenView(screenName)
|
|
}
|
|
|
|
override fun onPause() {
|
|
GeeksvilleApplication.analytics.endScreenView()
|
|
super.onPause()
|
|
}
|
|
}
|