I am trying to download an image from quickblox backend but I don't know ho to transform the recieved inputstream to a bitmap. Here my code:
QBCustomObjectsFiles.downloadFile(co, "fieldName", new QBEntityCallback<InputStream>(){
@Override
public void onSuccess(InputStream result, Bundle params)
{
Bitmap bm= BitmapFactory.decodeStream(result);
if (bm!=null)
{
job.foto = bm;
}
else
{
App.getInstance().log("ERROR");
}
}
The output error is DECORDER-->DECODER ERROR