This example repo demonstrates how to setup and use Typewriter in an Android Java environment, as a strongly-typed wrapper for analytics-android
.
Update the Segment write key in TypewriterApplication.java for the source you want to report analytics to:
private static final String SEGMENT_WRITE_KEY = "<Your source write key>";
Once you run the app, go the debugger to see events coming in!
The generated Typewriter client is available in app/src/main/java/com/segment/analytics/
.
The JSON schema used to generate this client is available in local-tracking-plans/tracking-plan.json
.
You can regenerate the Typewriter client using the following make
command:
$ make build typewriter
See README.md
for more information on instrumenting your Android app with Typewriter.