Hi,
I've now found out that I can open PDFs in an external reader from my C app
by using ACTION_VIEW through JNI from C. This is working fine when a PDF
reader has been installed on the device. If there is no PDF reader on the
device, however, I get the following error:
E/AndroidRuntime( 1719): android.content.ActivityNotFoundException: No Activity found to handle Intent
{act = android.intent.action.VIEW dat=file:///sdcard/test.pdf typ=application/pdf flg=0x10000000 }
Of course, this error makes sense because there is no PDF reader on the device.
What is annoying me, however, is that after this error my app is shut down by
Android!
Is there any way to disable this behaviour? I'd like to intercept this error
and display a message to the user that informs him that there is no PDF reader
on his device... I do not want my app getting shut down just because of a
missing PDF reader :-(
Tks for suggestions!
--
Best regards,
Andreas Falkenhahn mailto:
and...@falkenhahn.com