0

I just want to show image from cloudinary in a imageView in android. I looked their documentations but I couldn't find how to show any image from cloudinary. In their github, they don't explain how to show images.

Map config = new HashMap();
config.put("cloud_name", "n07t21i7");
config.put("api_key", "123456789012345");
config.put("api_secret", "abcdeghijklmnopqrstuvwxyz12");
Cloudinary cloudinary = new Cloudinary(config);

so what?

Main activity :

package gc.x;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.animation.Transformation;
import android.widget.ImageView;

import com.cloudinary.Cloudinary;
import com.cloudinary.utils.ObjectUtils;

import java.util.Map;

import gc.x.mCloud.CloudinaryClient;

public class MainActivity extends AppCompatActivity {



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        final ImageView img = (ImageView)findViewById(R.id.iv1);

   // ??

    }
}
serkan stack
  • 155
  • 5
  • 15
  • Use libraries such as [Picasso](http://square.github.io/picasso/) or [Glide](https://github.com/bumptech/glide) to load images from url to `ImageView` – SripadRaj Oct 17 '16 at 12:18
  • Possible duplicate of [How to load an ImageView by URL in Android?](http://stackoverflow.com/questions/2471935/how-to-load-an-imageview-by-url-in-android) – SripadRaj Oct 17 '16 at 12:19

1 Answers1

0

Use cloudinary URL to load images in your application using picasso or glide. Using picasso your code will look something like this -

picasso.load("https://res.cloudinary.com/yourCloudName/image/upload/f_auto/v1525420575/yourImageName.jpg")
       .into(imageHolder)

You can add image modifications to this URL for quality management or to manage width and height of the image. Cloudinary provides multiple options to modify an image.

Hope this helps.

Annsh Singh
  • 435
  • 5
  • 12