Open an image received by an online database

Asked

Viewed 68 times

0

I recover the image from the database as follows:

btm = BitmapFactory.decodeByteArray(data, 0, data.length);
imgView.setImageBitmap(btm);

And then I put an action to click on the image appear the image in the default Android viewer.

imgView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent1 = new Intent(Intent.ACTION_VIEW);
                intent1.setDataAndType(**"Tenho que colocar algo aqui"**, "image/*");
                startActivity(intent1);
            }
        });

Or how I could after recovering the picture put it to open in the gallery viewer.

  • Son, you’re in the Sopt translate your question.

  • I’ve already modified the publication!

  • 1

    You will only be able to display in the gallery if the file is downloaded on your device. Since it is only in Imageview, create a view/Activity/Fragment and display it the way you like. There are even some components of Imageview that already have zoom implemented

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.