I tried using:
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("file://" + file_to_open), "image/*");
context.startActivity(intent);
or
Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(file_to_open)),"image/jpeg");
context.startActivity(intent);
and it works, but when I try leaving the image viewing intent, I get a RuntimeException, StaleDataException Attempted to access a cursor after it has been closed
when I try launching a different intent, it works, so it's not related to pausing or resuming my activity
please someone help
turns out that it's other intents too, like email intent, when canceled, makes that error