Setting imageView from Firebase storage [duplicate]










1
















This question already has an answer here:



  • Unable to Show Image In ImageView From Firebase Storage

    2 answers



How can I set an image to an imageView directly from Firebase, given I already have the url to the user's uploaded image?










share|improve this question















marked as duplicate by jww, Alex Mamo android
Users with the  android badge can single-handedly close android questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Nov 12 '18 at 19:49


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • You can use Any networking library . Volley or Retrofit or Picasso

    – Rohit Singh
    Nov 12 '18 at 8:18











  • Show code how do you display image?

    – Piyush
    Nov 12 '18 at 8:27






  • 1





    Possible duplicate of Unable to Show Image In ImageView From Firebase Storage, How to display or get an image from Firebase storage, Unable to show images from Firebase Storage, etc. More generally, firebase display imageview storage site:stackoverflow.com

    – jww
    Nov 12 '18 at 9:45
















1
















This question already has an answer here:



  • Unable to Show Image In ImageView From Firebase Storage

    2 answers



How can I set an image to an imageView directly from Firebase, given I already have the url to the user's uploaded image?










share|improve this question















marked as duplicate by jww, Alex Mamo android
Users with the  android badge can single-handedly close android questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Nov 12 '18 at 19:49


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • You can use Any networking library . Volley or Retrofit or Picasso

    – Rohit Singh
    Nov 12 '18 at 8:18











  • Show code how do you display image?

    – Piyush
    Nov 12 '18 at 8:27






  • 1





    Possible duplicate of Unable to Show Image In ImageView From Firebase Storage, How to display or get an image from Firebase storage, Unable to show images from Firebase Storage, etc. More generally, firebase display imageview storage site:stackoverflow.com

    – jww
    Nov 12 '18 at 9:45














1












1








1









This question already has an answer here:



  • Unable to Show Image In ImageView From Firebase Storage

    2 answers



How can I set an image to an imageView directly from Firebase, given I already have the url to the user's uploaded image?










share|improve this question

















This question already has an answer here:



  • Unable to Show Image In ImageView From Firebase Storage

    2 answers



How can I set an image to an imageView directly from Firebase, given I already have the url to the user's uploaded image?





This question already has an answer here:



  • Unable to Show Image In ImageView From Firebase Storage

    2 answers







android firebase android-imageview firebase-storage






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 '18 at 11:40









KENdi

5,8192821




5,8192821










asked Nov 12 '18 at 8:16









James EleJames Ele

1918




1918




marked as duplicate by jww, Alex Mamo android
Users with the  android badge can single-handedly close android questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Nov 12 '18 at 19:49


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by jww, Alex Mamo android
Users with the  android badge can single-handedly close android questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Nov 12 '18 at 19:49


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • You can use Any networking library . Volley or Retrofit or Picasso

    – Rohit Singh
    Nov 12 '18 at 8:18











  • Show code how do you display image?

    – Piyush
    Nov 12 '18 at 8:27






  • 1





    Possible duplicate of Unable to Show Image In ImageView From Firebase Storage, How to display or get an image from Firebase storage, Unable to show images from Firebase Storage, etc. More generally, firebase display imageview storage site:stackoverflow.com

    – jww
    Nov 12 '18 at 9:45


















  • You can use Any networking library . Volley or Retrofit or Picasso

    – Rohit Singh
    Nov 12 '18 at 8:18











  • Show code how do you display image?

    – Piyush
    Nov 12 '18 at 8:27






  • 1





    Possible duplicate of Unable to Show Image In ImageView From Firebase Storage, How to display or get an image from Firebase storage, Unable to show images from Firebase Storage, etc. More generally, firebase display imageview storage site:stackoverflow.com

    – jww
    Nov 12 '18 at 9:45

















You can use Any networking library . Volley or Retrofit or Picasso

– Rohit Singh
Nov 12 '18 at 8:18





You can use Any networking library . Volley or Retrofit or Picasso

– Rohit Singh
Nov 12 '18 at 8:18













Show code how do you display image?

– Piyush
Nov 12 '18 at 8:27





Show code how do you display image?

– Piyush
Nov 12 '18 at 8:27




1




1





Possible duplicate of Unable to Show Image In ImageView From Firebase Storage, How to display or get an image from Firebase storage, Unable to show images from Firebase Storage, etc. More generally, firebase display imageview storage site:stackoverflow.com

– jww
Nov 12 '18 at 9:45






Possible duplicate of Unable to Show Image In ImageView From Firebase Storage, How to display or get an image from Firebase storage, Unable to show images from Firebase Storage, etc. More generally, firebase display imageview storage site:stackoverflow.com

– jww
Nov 12 '18 at 9:45













3 Answers
3






active

oldest

votes


















0














You can use image loading library like Glide or Picasso,



1st add the dependency in build.gradle (Moduke:App) under dependencies,



dependencies 
....
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'



Then at the activity where your image view is load the image from url:



Glide.with(this).load(IMAGE_URL).into(imageView);


IMAGE_URL is the firebase storage url for the image, and imageView is where you displaying the image.



Follow https://bumptech.github.io/glide/ for more info






share|improve this answer






























    0















    if you have image URL available at client side. Implement
    GLIDE and pass the URL and ImageView to Glide. It will take care of showing the image to client.




    ImageView imageView = findViewById(R.id.imageView_ID);

    RequestOptions requestOption = new RequestOptions()
    .placeholder(R.drawable.placeholder)
    .error(R.drawable.ic_error_1)
    .diskCacheStrategy(DiskCacheStrategy.ALL)
    .priority(Priority.HIGH)
    .dontAnimate()
    .dontTransform()

    new Glide
    .with(mcontext)
    .load("https://placeholder.com/img/products/imageurl.png")
    .apply(requestOption)
    .thumbnail(0.1f)
    .into(imageView)



    add dependency
    implementation 'com.github.bumptech.glide:glide:4.8.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'







    share|improve this answer
































      -1














       private CircleImageView uDisplayImage;
      currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();
      FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();

      String uId = currentFirebaseUser.getUid();
      myRef = firebaseDatabase.getReference("user").child(uId);
      myRef.addValueEventListener(new ValueEventListener()
      @Override
      public void onDataChange(@NonNull DataSnapshot dataSnapshot)



      image = dataSnapshot.child("image").getValue().toString();


      if (!image.equals("default"))

      Picasso.get().load(image).placeholder(R.drawable.idofcircularview).into(uDisplayImage);






      @Override
      public void onCancelled(@NonNull DatabaseError databaseError)
      Toast.makeText(SattingsActivity.this, "Sorry Data is not found", Toast.LENGTH_SHORT).show();


      );
      implementation 'de.hdodenhof:circleimageview:2.2.0'
      implementation 'com.squareup.picasso:picasso:2.71828'





      share|improve this answer





























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        0














        You can use image loading library like Glide or Picasso,



        1st add the dependency in build.gradle (Moduke:App) under dependencies,



        dependencies 
        ....
        implementation 'com.github.bumptech.glide:glide:4.8.0'
        annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'



        Then at the activity where your image view is load the image from url:



        Glide.with(this).load(IMAGE_URL).into(imageView);


        IMAGE_URL is the firebase storage url for the image, and imageView is where you displaying the image.



        Follow https://bumptech.github.io/glide/ for more info






        share|improve this answer



























          0














          You can use image loading library like Glide or Picasso,



          1st add the dependency in build.gradle (Moduke:App) under dependencies,



          dependencies 
          ....
          implementation 'com.github.bumptech.glide:glide:4.8.0'
          annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'



          Then at the activity where your image view is load the image from url:



          Glide.with(this).load(IMAGE_URL).into(imageView);


          IMAGE_URL is the firebase storage url for the image, and imageView is where you displaying the image.



          Follow https://bumptech.github.io/glide/ for more info






          share|improve this answer

























            0












            0








            0







            You can use image loading library like Glide or Picasso,



            1st add the dependency in build.gradle (Moduke:App) under dependencies,



            dependencies 
            ....
            implementation 'com.github.bumptech.glide:glide:4.8.0'
            annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'



            Then at the activity where your image view is load the image from url:



            Glide.with(this).load(IMAGE_URL).into(imageView);


            IMAGE_URL is the firebase storage url for the image, and imageView is where you displaying the image.



            Follow https://bumptech.github.io/glide/ for more info






            share|improve this answer













            You can use image loading library like Glide or Picasso,



            1st add the dependency in build.gradle (Moduke:App) under dependencies,



            dependencies 
            ....
            implementation 'com.github.bumptech.glide:glide:4.8.0'
            annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'



            Then at the activity where your image view is load the image from url:



            Glide.with(this).load(IMAGE_URL).into(imageView);


            IMAGE_URL is the firebase storage url for the image, and imageView is where you displaying the image.



            Follow https://bumptech.github.io/glide/ for more info







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 12 '18 at 8:55









            AmrAmr

            113




            113























                0















                if you have image URL available at client side. Implement
                GLIDE and pass the URL and ImageView to Glide. It will take care of showing the image to client.




                ImageView imageView = findViewById(R.id.imageView_ID);

                RequestOptions requestOption = new RequestOptions()
                .placeholder(R.drawable.placeholder)
                .error(R.drawable.ic_error_1)
                .diskCacheStrategy(DiskCacheStrategy.ALL)
                .priority(Priority.HIGH)
                .dontAnimate()
                .dontTransform()

                new Glide
                .with(mcontext)
                .load("https://placeholder.com/img/products/imageurl.png")
                .apply(requestOption)
                .thumbnail(0.1f)
                .into(imageView)



                add dependency
                implementation 'com.github.bumptech.glide:glide:4.8.0'
                annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'







                share|improve this answer





























                  0















                  if you have image URL available at client side. Implement
                  GLIDE and pass the URL and ImageView to Glide. It will take care of showing the image to client.




                  ImageView imageView = findViewById(R.id.imageView_ID);

                  RequestOptions requestOption = new RequestOptions()
                  .placeholder(R.drawable.placeholder)
                  .error(R.drawable.ic_error_1)
                  .diskCacheStrategy(DiskCacheStrategy.ALL)
                  .priority(Priority.HIGH)
                  .dontAnimate()
                  .dontTransform()

                  new Glide
                  .with(mcontext)
                  .load("https://placeholder.com/img/products/imageurl.png")
                  .apply(requestOption)
                  .thumbnail(0.1f)
                  .into(imageView)



                  add dependency
                  implementation 'com.github.bumptech.glide:glide:4.8.0'
                  annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'







                  share|improve this answer



























                    0












                    0








                    0








                    if you have image URL available at client side. Implement
                    GLIDE and pass the URL and ImageView to Glide. It will take care of showing the image to client.




                    ImageView imageView = findViewById(R.id.imageView_ID);

                    RequestOptions requestOption = new RequestOptions()
                    .placeholder(R.drawable.placeholder)
                    .error(R.drawable.ic_error_1)
                    .diskCacheStrategy(DiskCacheStrategy.ALL)
                    .priority(Priority.HIGH)
                    .dontAnimate()
                    .dontTransform()

                    new Glide
                    .with(mcontext)
                    .load("https://placeholder.com/img/products/imageurl.png")
                    .apply(requestOption)
                    .thumbnail(0.1f)
                    .into(imageView)



                    add dependency
                    implementation 'com.github.bumptech.glide:glide:4.8.0'
                    annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'







                    share|improve this answer
















                    if you have image URL available at client side. Implement
                    GLIDE and pass the URL and ImageView to Glide. It will take care of showing the image to client.




                    ImageView imageView = findViewById(R.id.imageView_ID);

                    RequestOptions requestOption = new RequestOptions()
                    .placeholder(R.drawable.placeholder)
                    .error(R.drawable.ic_error_1)
                    .diskCacheStrategy(DiskCacheStrategy.ALL)
                    .priority(Priority.HIGH)
                    .dontAnimate()
                    .dontTransform()

                    new Glide
                    .with(mcontext)
                    .load("https://placeholder.com/img/products/imageurl.png")
                    .apply(requestOption)
                    .thumbnail(0.1f)
                    .into(imageView)



                    add dependency
                    implementation 'com.github.bumptech.glide:glide:4.8.0'
                    annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'








                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Nov 12 '18 at 9:53









                    jww

                    53.3k40230504




                    53.3k40230504










                    answered Nov 12 '18 at 8:53









                    Chethan KumarChethan Kumar

                    123110




                    123110





















                        -1














                         private CircleImageView uDisplayImage;
                        currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();
                        FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();

                        String uId = currentFirebaseUser.getUid();
                        myRef = firebaseDatabase.getReference("user").child(uId);
                        myRef.addValueEventListener(new ValueEventListener()
                        @Override
                        public void onDataChange(@NonNull DataSnapshot dataSnapshot)



                        image = dataSnapshot.child("image").getValue().toString();


                        if (!image.equals("default"))

                        Picasso.get().load(image).placeholder(R.drawable.idofcircularview).into(uDisplayImage);






                        @Override
                        public void onCancelled(@NonNull DatabaseError databaseError)
                        Toast.makeText(SattingsActivity.this, "Sorry Data is not found", Toast.LENGTH_SHORT).show();


                        );
                        implementation 'de.hdodenhof:circleimageview:2.2.0'
                        implementation 'com.squareup.picasso:picasso:2.71828'





                        share|improve this answer



























                          -1














                           private CircleImageView uDisplayImage;
                          currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();
                          FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();

                          String uId = currentFirebaseUser.getUid();
                          myRef = firebaseDatabase.getReference("user").child(uId);
                          myRef.addValueEventListener(new ValueEventListener()
                          @Override
                          public void onDataChange(@NonNull DataSnapshot dataSnapshot)



                          image = dataSnapshot.child("image").getValue().toString();


                          if (!image.equals("default"))

                          Picasso.get().load(image).placeholder(R.drawable.idofcircularview).into(uDisplayImage);






                          @Override
                          public void onCancelled(@NonNull DatabaseError databaseError)
                          Toast.makeText(SattingsActivity.this, "Sorry Data is not found", Toast.LENGTH_SHORT).show();


                          );
                          implementation 'de.hdodenhof:circleimageview:2.2.0'
                          implementation 'com.squareup.picasso:picasso:2.71828'





                          share|improve this answer

























                            -1












                            -1








                            -1







                             private CircleImageView uDisplayImage;
                            currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();
                            FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();

                            String uId = currentFirebaseUser.getUid();
                            myRef = firebaseDatabase.getReference("user").child(uId);
                            myRef.addValueEventListener(new ValueEventListener()
                            @Override
                            public void onDataChange(@NonNull DataSnapshot dataSnapshot)



                            image = dataSnapshot.child("image").getValue().toString();


                            if (!image.equals("default"))

                            Picasso.get().load(image).placeholder(R.drawable.idofcircularview).into(uDisplayImage);






                            @Override
                            public void onCancelled(@NonNull DatabaseError databaseError)
                            Toast.makeText(SattingsActivity.this, "Sorry Data is not found", Toast.LENGTH_SHORT).show();


                            );
                            implementation 'de.hdodenhof:circleimageview:2.2.0'
                            implementation 'com.squareup.picasso:picasso:2.71828'





                            share|improve this answer













                             private CircleImageView uDisplayImage;
                            currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();
                            FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();

                            String uId = currentFirebaseUser.getUid();
                            myRef = firebaseDatabase.getReference("user").child(uId);
                            myRef.addValueEventListener(new ValueEventListener()
                            @Override
                            public void onDataChange(@NonNull DataSnapshot dataSnapshot)



                            image = dataSnapshot.child("image").getValue().toString();


                            if (!image.equals("default"))

                            Picasso.get().load(image).placeholder(R.drawable.idofcircularview).into(uDisplayImage);






                            @Override
                            public void onCancelled(@NonNull DatabaseError databaseError)
                            Toast.makeText(SattingsActivity.this, "Sorry Data is not found", Toast.LENGTH_SHORT).show();


                            );
                            implementation 'de.hdodenhof:circleimageview:2.2.0'
                            implementation 'com.squareup.picasso:picasso:2.71828'






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 12 '18 at 19:42









                            Vishal SharmaVishal Sharma

                            7822212




                            7822212













                                Popular posts from this blog

                                𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

                                Crossroads (UK TV series)

                                ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế