io.keen.client.android
Class AndroidKeenClientBuilder

java.lang.Object
  extended by io.keen.client.java.KeenClient.Builder
      extended by io.keen.client.android.AndroidKeenClientBuilder

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.

Since:
2.0.0

Constructor Summary
AndroidKeenClientBuilder(android.content.Context context)
           
 
Method Summary
protected  io.keen.client.java.KeenEventStore getDefaultEventStore()
           
protected  io.keen.client.java.KeenJsonHandler getDefaultJsonHandler()
           
protected  io.keen.client.java.KeenNetworkStatusHandler getDefaultNetworkStatusHandler()
           
 
Methods inherited from class io.keen.client.java.KeenClient.Builder
build, buildInstance, getDefaultHttpHandler, getDefaultPublishExecutor, getEventStore, getHttpHandler, getJsonHandler, getNetworkStatusHandler, getPublishExecutor, setEventStore, setHttpHandler, setJsonHandler, setNetworkStatusHandler, setPublishExecutor, withEventStore, withHttpHandler, withJsonHandler, withNetworkStatusHandler, withPublishExecutor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AndroidKeenClientBuilder

public AndroidKeenClientBuilder(android.content.Context context)
Method Detail

getDefaultJsonHandler

protected io.keen.client.java.KeenJsonHandler getDefaultJsonHandler()
Specified by:
getDefaultJsonHandler in class io.keen.client.java.KeenClient.Builder

getDefaultEventStore

protected io.keen.client.java.KeenEventStore getDefaultEventStore()
                                                           throws Exception
Overrides:
getDefaultEventStore in class io.keen.client.java.KeenClient.Builder
Throws:
Exception

getDefaultNetworkStatusHandler

protected io.keen.client.java.KeenNetworkStatusHandler getDefaultNetworkStatusHandler()
Overrides:
getDefaultNetworkStatusHandler in class io.keen.client.java.KeenClient.Builder