Android Integrated Libraries
Overview
This page lists integrated libraries you can use for Android and Android TV Monitoring.
Coil
If you use Coil to load images in your application, take a look at Datadog’s dedicated Coil library.
Fresco
If you use Fresco to load images in your application, take a look at Datadog’s dedicated Fresco library.
Glide
If you use Glide to load images in your application, take a look at Datadog’s dedicated Glide library.
Jetpack Compose
If you use Jetpack Compose in your application, take a look at Datadog’s dedicated Jetpack Compose library.
Picasso
If you use Picasso, let it use your OkHttpClient
for RUM and APM information about network requests made by Picasso.
val picasso = Picasso.Builder(context)
.downloader(OkHttp3Downloader(okHttpClient))
// …
.build()
Picasso.setSingletonInstance(picasso)
final Picasso picasso = new Picasso.Builder(context)
.downloader(new OkHttp3Downloader(okHttpClient))
// …
.build();
Picasso.setSingletonInstance(picasso);
Retrofit
If you use Retrofit, let it use your OkHttpClient
for RUM and APM information about network requests made with Retrofit.
val retrofitClient = Retrofit.Builder()
.client(okHttpClient)
// …
.build()
final Retrofit retrofitClient = new Retrofit.Builder()
.client(okHttpClient)
// …
.build();
SQLDelight
If you use SQLDelight, take a look at Datadog’s dedicated SQLDelight library.
SQLite
Following SQLiteOpenHelper’s generated API documentation, you only have to provide the implementation of the
DatabaseErrorHandler
-> DatadogDatabaseErrorHandler
in the constructor.
Doing this detects whenever a database is corrupted and sends a relevant
RUM error event for it.
class <YourOwnSqliteOpenHelper>: SqliteOpenHelper(
<Context>,
<DATABASE_NAME>,
<CursorFactory>,
<DATABASE_VERSION>,
DatadogDatabaseErrorHandler()) {
// …
}
public class <YourOwnSqliteOpenHelper> extends SqliteOpenHelper {
public <YourOwnSqliteOpenHelper>(){
super(<Context>,
<DATABASE_NAME>,
<CursorFactory>,
<DATABASE_VERSION>,
new DatadogDatabaseErrorHandler());
}
}
Apollo (GraphQL)
If you use Apollo, let it use your OkHttpClient
for RUM and APM information about all the queries performed through Apollo client.
val apolloClient = ApolloClient.builder()
.okHttpClient(okHttpClient)
.serverUrl(<APOLLO_SERVER_URL>)
.build()
final ApolloClient apolloClient = new ApolloClient.builder()
.okHttpClient(okHttpClient)
.serverUrl(<APOLLO_SERVER_URL>)
.build();
Android TV (Leanback)
If you use the Leanback API to add actions into your Android TV application, take a look at Datadog’s dedicated Android TV library.
Further Reading
Additional helpful documentation, links, and articles: