public class AndroidKeenClientBuilder
extends io.keen.client.java.KeenClient.Builder
KeenClient.Builder with defaults suited for use on the Android
platform.
This client uses the built-in Android JSON libraries for reading/writing JSON in order to
minimize library size. For applications which already include a more robust JSON library such
as Jackson or GSON, configure the builder to use an appropriate KeenJsonHandler via
the KeenClient.Builder.withJsonHandler(KeenJsonHandler) method.
To cache events in between batch uploads, this client uses a file-based event store with its root in the application's cache directory. It is important to use a file-based (or otherwise persistent, i.e. non-RAM) event store because the application process could be destroyed without notice.
Other defaults are those provided by the parent KeenClient.Builder
implementation.
| Constructor and Description |
|---|
AndroidKeenClientBuilder(android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
protected io.keen.client.java.KeenEventStore |
getDefaultEventStore() |
protected io.keen.client.java.KeenJsonHandler |
getDefaultJsonHandler() |
protected io.keen.client.java.KeenNetworkStatusHandler |
getDefaultNetworkStatusHandler() |
build, buildInstance, getDefaultHttpHandler, getDefaultPublishExecutor, getEventStore, getHttpHandler, getJsonHandler, getNetworkStatusHandler, getPublishExecutor, setEventStore, setHttpHandler, setJsonHandler, setNetworkStatusHandler, setPublishExecutor, withConnectTimeout, withEventStore, withHttpHandler, withJsonHandler, withNetworkStatusHandler, withPublishExecutor, withReadTimeoutpublic AndroidKeenClientBuilder(android.content.Context context)
protected io.keen.client.java.KeenJsonHandler getDefaultJsonHandler()
getDefaultJsonHandler in class io.keen.client.java.KeenClient.Builderprotected io.keen.client.java.KeenEventStore getDefaultEventStore()
throws java.lang.Exception
getDefaultEventStore in class io.keen.client.java.KeenClient.Builderjava.lang.Exceptionprotected io.keen.client.java.KeenNetworkStatusHandler getDefaultNetworkStatusHandler()
getDefaultNetworkStatusHandler in class io.keen.client.java.KeenClient.Builder