I’m writing a case statement to launch and xml parser activity and want to set a different inputstream based on what the user clicks, can I set the inputstream from a variable?
Here’s the inputstream:
InputStream inputStream = getResources().openRawResource(R.raw.myxmlfile);
I’ve tried setting a string with getResources().openRawResource(R.raw.myxmlfile) and that didn’t work, I also tried setting the xml file as a string and that didn’t work. Is this even possible?
It’s not a string. It should be declared integer.