On Wed, Oct 31, 2012 at 3:09 AM, Jovish P <[email protected]> wrote: > When user clicks on a button i want to open the pdf file stored inside our > application(ie which is inside Assets folder of our app). Open means , to > view the pdf file using Intent. I don't have any problem in using third > party applications to view pdf file.In the intent i sepcify mimetype , so > it will list all the pdf viewer installed in his phone. So user can select > his favorite pdf viewer to view the pdf file which is stored in our > application > > <some-context-instance>.getAssets().open(assetName) will return inputstream. > That is not wht we need. Thanks for this suggestion
I see. So I suggest you to create a content provider and invoke the third-party app with a corresponding intent (supposing that the viewer is able to read from a provider, of course). That would be the elegant and fancy approach. A not-so-fancy solution is to copy the PDF to the SD card and invoke the viewer app with a file:// URI. This approach has a disadvantage: it's hard to know when the copy can be removed because you don't know when the viewer will stop accessing it. > I guess now everything is clear. sorry for my bad English. -- "The flames are all long gone, but the pain lingers on" -- 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

