I\'m trying to create an input stream by doing this
InputStream is = (InputStream) getResources().openRawResource(R.drawable.image1);
but I
It is because They are expecting a raw type resource and you are passing a drawable type one. make a raw folder in the res folder and then put your image in the raw folder.