Android integration


Cloudinary is a cloud-based service that provides an end-to-end image and video management solution. The Android SDK provides simple, yet comprehensive file upload, administration, manipulation, optimization, and delivery capabilities that you can implement using code that integrates seamlessly with your existing Android application.

The Cloudinary Android SDK requires Android 4.1 or higher.

Quick example

The following Cloudinary URL and corresponding Android code generates the image below including all of the following transformations:

  • A thumbnail crop to a size of 150x150 pixels using face detection gravity to automatically determine the location for the crop
  • Rotated 20 degrees
  • Sepia effect
  • Cloudinary logo overlay on the southeast corner (with a slight offset). The logo is scaled down to a 50 pixel width, with increased brightness, and partial transparency (opaqueness = 60%)
  • 10 degree rotation
  • Converted to and delivered in PNG format (the originally uploaded image was a JPG)

MediaManager.get().url().transformation(new Transformation()
Example dynamic delivery URL

Android SDK features

Cloudinary provides a Android library with an easy-to-use API for further simplifying the integration.

  • Build URLs for image and video transformation & manipulation.
  • Direct uploading to the cloud from your application.
  • Upload policy options (upload only on non-metered networks, only when charging, etc) globally or per upload request.
  • Asynchronous upload with callbacks.
  • Automatic error handling for network disconnections, timeouts, etc.

Android capitalization and data type guidelines

When using the Android SDK, keep these guidelines in mind:

  • Parameter names: snake_case. For example: public_id
  • Classes: PascalCase. For example: MediaManager
  • Methods: camelCase. For example: upload
  • Pass parameter data as: Map

Getting started

This section describes the information you need to know for installing and setting up Cloudinary in your Android application.


The following instructions detail the installation of the Cloudinary Android library. Note that there is no need for any ProGuard configuration. Use one of the following options:

Gradle installation

Add the following line of code within the dependencies section of your build.gradle file:

compile group: 'com.cloudinary', name: 'cloudinary-android', version: '1.20.0'

Maven installation

Add the following tag within the dependencies tag in your pom.xml file:


Manual installation

Download the following 2 files and put them in your libs folder:


To use the Cloudinary Android library you have to configure at least your cloud_name. You can additionally define a number of optional configuration parameters if relevant. You can find your configuration parameters in the dashboard of our Management Console.

The entry point of the library is the MediaManager object. The MediaManager.init() method must be called once per application lifecycle before using the Android library, preferably in Application.onCreate(). Setting the configuration parameters can be done either when initializing the library, or by using the CLOUDINARY_URL meta-data property in the AndroidManifest.xml file.

Config with init

To set the configuration parameters programmatically while initializing the MediaManager, pass a HashMap with parameters as the second argument of the init method. For example:

Map config = new HashMap();
config.put("cloud_name", "myCloudName");
MediaManager.init(this, config);

Config with meta-data

Alternatively, you can add the CLOUDINARY_URL meta-data property to the AndroidManifest.xml file, within the application tag. For example:


When using the meta-data property, no configuration is required when initializing the MediaManager:


Sample project

The Android sample project uses Cloudinary's Android SDK to perform direct uploading with uploading progress indication and an image preview with advanced transformations.