/android-gluten

Glue code between popular android libraries. Ready to use implementations for Picasso, NewRelic, Espresso, Priority-Jobqeue

Primary LanguageJavaOtherNOASSERTION

android-gluten

Gluten is what it all holds together. This is the glue code between popular android libraries.

Espresso:

Espresso is a testing library based on Android Instrumentation tests https://code.google.com/p/android-test-kit/wiki/Espresso

Before checking assertions Espresso waits to let app be idle. Therefore it checks the mainlooper and AsyncTasks default-executor. But custom threads and threadpools must be registerd as "IdleResource" to be monitored.

IdleResource for Android Priority-JobQueue

https://github.com/path/android-priority-jobqueue

Usage: Espresso.registerIdlingResources(new PriorityJobQueueIdleMonitor(new JobManager(context)));

New Relic implementations for OkHttp

New Relic is an app monitoring tool. It can log HTTP results for HttpUrlConnection and Apache but not OkHttp

https://docs.newrelic.com/docs/mobile-apps/android-api

New Relic Trace for Retrofit

Usage: instead of

new OkClient(new OkHttpClient()) for the RestAdapter use:

new TracedRetrofitClient(new OkClient(new OkHttpClient()), new NewRelicTracer())

https://github.com/square/retrofit https://github.com/square/okhttp

TODO: very basic for now, no load tracking

New Relic Trace for Picasso

Usage: create your Picasso instance with something like this:

new Picasso.Builder(context).downloader( new TracedPicassoDownloader(new NewRelicTracer(), context)).build();

https://github.com/square/picasso

TODO: very basic for now, no load tracking

These source samples are licensed under MIT license (c) 2014 Danny Preussler