Created
March 24, 2022 16:02
-
-
Save dturner/20486cb6d745c68599586c40316c8345 to your computer and use it in GitHub Desktop.
Reporting performance class to Firebase analytics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyApplication : Application() { | |
private lateinit var devicePerf: DevicePerformance | |
private lateinit var firebaseAnalytics: FirebaseAnalytics | |
override fun onCreate() { | |
devicePerf = DevicePerformance.create(this) | |
firebaseAnalytics = Firebase.analytics | |
firebaseAnalytics.setUserProperty( | |
"androidx.core.performance.DevicePerformance.mediaPerformanceClass", | |
devicePerf.mediaPerformanceClass) | |
} | |
fun getVideoEncodeHeight() : Long = remoteConfig.getLong("encode_height") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment