Android SDK 3.0.28

What's new

  • Added sdk.setGetRequestInterceptor() to customize outgoing LiveLike API GET requests, including per-request authentication control.
  • Deprecated preferAnonymousRequests in favor of the new interceptor.
  • Fixed duplicate query parameters in comment-count and comment-related pagination requests.
  • Added versioned Android SDK API reference documentation.
    https://sdk-reference.livelikecdn.com/android

Example: Removing authentication from comment requests

import com.livelike.network.removeAuth
import io.ktor.http.encodedPath

sdk.setGetRequestInterceptor { request ->
    if (request.url.encodedPath == "/api/v1/comments/") {
        request.headers.removeAuth()
    }
}

This example removes authentication from comment GET requests. The interceptor applies only to HTTPS GET requests to cf-blast.livelikecdn.com.

Removing the interceptor

Pass null to remove it:

sdk.setGetRequestInterceptor(null)