@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == faq_doc_req_code) { copy_resources_Obj.deleteTempFile("faq.pdf"); } }
public void faqButtonClick(View v) { Intent pdfIntent = new Intent(Intent.ACTION_VIEW); pdfIntent.setDataAndType( Uri.fromFile(copy_resources_Obj.copyHelpFiles("faq.pdf")), "application/pdf"); try { startActivityForResult(pdfIntent, faq_doc_req_code); } catch (ActivityNotFoundException anfe) { Toast.makeText( SpacePlanAppHome.this, "No Application available to view pdf!", Toast.LENGTH_LONG) .show(); } }