Then what do you suggest? Should i put the pdf on net and put it's url ? On Wed, Dec 29, 2010 at 9:36 PM, Mark Murphy <[email protected]>wrote:
> On Wed, Dec 29, 2010 at 10:58 AM, Robin Talwar > <[email protected]> wrote: > > Sorry > > I checked the path and i made a foolish mistake of not writing the name > of > > the file correctly. > > Except that everything should go well . > > So is the following line correct ; sry i am a beginner > > > > i.setDataAndType(Uri.parse("file:///raw/unlockingandroid.pdf"), > > "application/pdf"); > > > > or is it that the path in Uri.parse("") is still incorrect > > I have the pdf in raw folder > > There is no "raw folder". Your project, on your PC, has a res/raw/ > folder. That is not a folder on the Android device. It is not accessed > via a file:/// URL. It is a type of resource, and its contents are > accessed via getResources().openRawResource(). > > The contents of a resource like this are not accessible via Uri > objects. Hence, there is no simple way for you to store a PDF as a raw > resource in a project of yours and have it be displayed by some other > application. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://github.com/commonsguy > http://commonsware.com/blog | http://twitter.com/commonsguy > > Android App Developer Books: http://commonsware.com/books > > -- > 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]<android-developers%[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

