4   Developing Applications

4.1   Opening a PDF with Reader (Android)

To launch Reader Mobile directly from your Android application, use the code below. The file must be accessible to Reader Mobile.

File f = new File(filepath);
     Intent i = new Intent();
     i.setAction(Intent.ACTION_VIEW);
     i.setData(Uri.fromFile(f));
     i.setComponent(new ComponentName("com.adobe.reader", "com.adobe.reader.AdobeReader"));
     try
     {
             startActivity(i);
     }
     catch (ActivityNotFoundException e)
     {
             Log.i("App_Tag","Exception - "+e.getMessage());
     }