I have run into this before... Are you using a Samsung device, by chance? I don't know if your problem is exactly the same as ours, but for us we were able to get around the problem by temporarily creating a copy of the PDF in a publicly readable location, and then giving that location instead.
Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Mon, Jul 23, 2012 at 6:45 PM, mallik arjun <[email protected]>wrote: > Hi Everyone. > > We have implemented a custom content provider serving pdf documents as > ParcelFileDescriptor. Files are stored in the local storage marked as > PRIVATE. Based on an URI the documents are then handed over to the selected > pdf application. > > This works for all PDF Viewer applications except adobe reader. Can > someone please confirm that adobe reader does not work with content > providers? > > The Following overridden method "openFile" doesn't execute at all when > the "adobe reader" app is selected. It always gives "Invalid File Path". > > And, is it possible to make it work using content://Uri values for ADOBE > reader. Please let me know. > > > > @Override > public ParcelFileDescriptor openFile(Uri uri, String mode) throws > FileNotFoundException > { > // The filename is the path in the URI without the initial slash. > String fileName = uri.getPath().substring(1); > File file = getContext().getFileStreamPath(fileName); > return ParcelFileDescriptor.open(file, ParcelFileDescriptor. > MODE_READ_ONLY); > } > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

