I'm trying to create an input stream by doing this
InputStream is = (InputStream) getResources().openRawResource(R.drawable.image1);
but I'm met with the error "Expected resource of type raw" with respect to my drawable file (R.drawable.image1). image1 is a png and in my res/drawable folder.
Any ideas???
@Broatian I don't currently have a res/raw folder. I found an alternative solution:
is = context.getResources().openRawResource(+ R.drawable.image1);
The +
shows additional folders. Thanks for the help!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With