So i have uploaded my video to my amazon DataBase, and now i Want to download it and display it, here is the part of my code where i download it:
S3ObjectInputStream content = s3.getObject(
Constants.getVideoBucket(),
keyList.get(i).getKey().toString())
.getObjectContent();
byte[] bytes = IOUtils.toByteArray(content);
Now I have the byte array that has the video, but i dont know what to do next. What should i do? I want to display it on a VideoView that I have ready.
help will be much apreciated
ps: i dont want to write down the video to the sd card! (imagine a youtube video, it gisplays but it wont write to ur sd card every video you watch.!)!!!!!!!!!!!!
EDIT1: i did this with the pictures:
S3ObjectInputStream content = s3.getObject(
Constants.getPictureBucket(),
keyList.get(i).getKey().toString())
.getObjectContent();
byte[] bytes = IOUtils.toByteArray(content);
bitmap = BitmapFactory.decodeByteArray(bitmaparray.get(i), 0,
bitmaparray.get(i).length);
imageview.setImageBitmap(bitmap);
as you can see, i converted the byte array to bitmap and then displayed it to a imageview, could you please help me to do the same with the video one???