-4

I know a library called libaums and had implemented it, but I don't know how to open Images and Videos using their library.

Vivek Patel
  • 103
  • 1
  • 10

1 Answers1

0

According to https://github.com/magnusja/libaums, you can actually read a file from the storage using this:

// read from a file
InputStream is = new UsbFileInputStream(file);
byte[] buffer = new byte[currentFs.getChunkSize()];
is.read(buffer);

Then your buffer contains the image data, so you can convert it to e.g. a Bitmap, like this:

Bitmap bmp = BitmapFactory.decodeByteArray(buffer , 0, buffer .length);

After that you can set it to an ImageView or whatever to show it to your user.

To be short, find your File and implement this logic.

gi097
  • 7,313
  • 3
  • 27
  • 49