I'm starting a pdf reader from code like this:
public static final int MY_INTENT_FLAG = 1;
String documentName = "filename.pdf";
File file = new File(getFilesDir(), documentName);
if (file != null && file.exists()) {
Uri filePathUri = Uri.fromFile(file);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(filePathUri, "application/pdf");
try {
startActivityForResult(intent,MY_INTENT_FLAG);
} catch (ActivityNotFoundException e) {...}
}
It works fine to open the document and read it. However, when I press the back button from the pdf reader onActivityResult() is not called. Why is this? Can it simply be because that particular pdf reader does not set a result code when finishing? I have Acrobat Reader on my device.
I want to know when I get back from the external Activity so that the user don't need to login again in this case.
Thank you for any input