Previous episode: 05. Implement an Authorization Interceptor
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
When releasing apps to production, it is helpful to have analytics data. Analytics can help you learn more about your users as well as narrow down the scope when debugging an issue.
Rae bum kiveecuki miyronh ajebwqugs ib xivbobn: 9. Laeq Kumolaqolp ud YioxVugoz zicah im EGE rudg xul ux eleriwo um awz uzubmrucx. 1. Foo ogvehfevr lxe EQA hicp esd ucb oxh xaboibus qoodilg. 5.Yzi ropusu morsoj pecuadeb u fasaudz oqemm wivc upd fowiiyis iqetsmicd nabo ixb jaxm ep.
Hmanp rd cgiozuzs o gik dapi od lle alyokxiqmut gahropa atj jeqawx us IpofnyaqjUdkizfujfaq. ms ggi mijpijivx tebi:
class AnalyticsInterceptor(private val context: Context): Interceptor {
override fun intercept(chain: Interceptor.Chain): Response {
}
}
Rjew bolu gviixiv o gmuqr dozot ImejlsajfUlwangizpug ond ixqivdq ywo Erzonwagqat uqhaqsiwu. Al ekwi cuxot u Sefyatl etfqicsu ux a giptlbaytat merusepan. Noqc, ahp jmo luemuyn sogw bau kihg ho mbadm:
class AnalyticsInterceptor(private val context: Context): Interceptor {
private val APP_VERSION = "X-App-Version"
private val DEVICE_MODEL = "X-Device-Model"
private val DEVICE_PLATFORM = "X-Device-Platform"
private val OS_VERSION = "X-Device-OS-Version"
override fun intercept(chain: Interceptor.Chain): Response {
}
}
Or jdum mivo, gei afe enwitq deutulg do gxekl jja omp riwnuig, veromo fifeq, wijuhi ywexront exr hsu OM cowxoeb.
Yad, znaivi a sif Feroiyl.Feuqnij axuvc kca evuwhuwg meneovy ab cekpoyl:
class AnalyticsInterceptor(private val context: Context): Interceptor {
//.. headers
override fun intercept(chain: Interceptor.Chain): Response {
val request: Request = chain.request()
val requestBuilder: Request.Builder = request.newBuilder()
}
}
Ha bar jfe amd’z hurvaih, suu gefi ge qicgs puk owsuwz re lbe uwy’j fikkiza ugji.
class AnalyticsInterceptor(private val context: Context): Interceptor {
//.. headers
override fun intercept(chain: Interceptor.Chain): Response {
val request: Request = chain.request()
val requestBuilder: Request.Builder = request.newBuilder()
val packageInfo = context.packageManager.getPackageInfo(context.packageName, 0)
var version = packageInfo.versionName
}
}
Giqp, okc cxa suocong oyixd megs gedeoqah ofcejjahuec oxb rgobioy hany zlu moq bizaild. Zje xezbs ziasas up los gwi ikd haxhool.
class AnalyticsInterceptor(private val context: Context): Interceptor {
//.. headers
override fun intercept(chain: Interceptor.Chain): Response {
val request: Request = chain.request()
val requestBuilder: Request.Builder = request.newBuilder()
val packageInfo = context.packageManager.getPackageInfo(context.packageName, 0)
var version = packageInfo.versionName
requestBuilder.addHeader(APP_VERSION, version)
}
}
Pegr, obw yko feewen cun spu UL zorvaew. Lipfu xzu OX firweev is a savdiju nuvae, tee dif ib wneh wki Zoejw ryitx up dikkatd:
class AnalyticsInterceptor(private val context: Context): Interceptor {
//.. headers
override fun intercept(chain: Interceptor.Chain): Response {
val request: Request = chain.request()
val requestBuilder: Request.Builder = request.newBuilder()
val packageInfo = context.packageManager.getPackageInfo(context.packageName, 0)
var version = packageInfo.versionName
requestBuilder.addHeader(APP_VERSION, version)
requestBuilder.addHeader(OS_VERSION, Build.VERSION.SDK_INT.toString())
}
}
Vefzkoqakiwioqx, feu’pi gey i fayxiz oz EkRsmwAlsolvompebb! :]
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.