Android Cookie authentication
Genius live servers need to verify cookies in every request made from the player in order to allow segments to be buffered on the player, android has the cookies disabled in the app by default.
Without the cookies being present in the requests made by the player, an error is displayed on the player saying that an error has occurred during native playback. This because the requests from the player get unauthorized response from our servers.
We have to keep in mind that cookie management in android and chrome differs a bit so for this scenario we don't have to add a policy, instead we could just make the app to accept browser cookies like this:
private fun configureCookieManager() {
if (android.os.Build.VERSION.SDK_INT >= 21) {
CookieManager.getInstance().setAcceptThirdPartyCookies(webview, true)
} else {
CookieManager.getInstance().setAcceptCookie(true)
}
}