mirror of
https://github.com/google-ai-edge/gallery.git
synced 2025-07-05 14:10:35 -04:00
[gallery] add Firebase Analytics "app_open" event
PiperOrigin-RevId: 778165756
This commit is contained in:
parent
d97e115993
commit
f271d49f4b
1 changed files with 13 additions and 0 deletions
|
@ -62,6 +62,19 @@ class MainActivity : ComponentActivity() {
|
||||||
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onResume() {
|
||||||
|
super.onResume()
|
||||||
|
|
||||||
|
firebaseAnalytics?.logEvent(
|
||||||
|
"app_open",
|
||||||
|
Bundle().apply {
|
||||||
|
putString("app_version", BuildConfig.VERSION_NAME)
|
||||||
|
putString("os_version", Build.VERSION.SDK_INT.toString())
|
||||||
|
putString("device_model", Build.MODEL)
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val TAG = "AGMainActivity"
|
private const val TAG = "AGMainActivity"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue