1
0
Fork 0

For #973 - Adds first metric to track

master
Jeff Boek 2019-03-12 16:01:46 -07:00
parent 644e88dacb
commit 044e8fd7fa
1 changed files with 6 additions and 0 deletions

View File

@ -23,6 +23,7 @@ import mozilla.components.support.base.feature.BackHandler
import mozilla.components.support.ktx.kotlin.isUrl
import mozilla.components.support.ktx.kotlin.toNormalizedUrl
import mozilla.components.support.utils.SafeIntent
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.home.HomeFragmentDirections
import org.mozilla.fenix.search.SearchFragmentDirections
@ -59,6 +60,11 @@ open class HomeActivity : AppCompatActivity() {
handleOpenedFromExternalSourceIfNecessary(intent)
}
override fun onResume() {
super.onResume()
components.analytics.metrics.track(Event.OpenedApp)
}
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
handleOpenedFromExternalSourceIfNecessary(intent)