How to open a PDF stored in Internal Memory

后端 未结 2 1659
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-18 17:02

I have an App that downloads a PDF file and stores it with MODE_PRIVATE (for security purposes) on the Internal Memory of the App:

FileOutputStream fos = get         


        
2条回答
  •  渐次进展
    2021-01-18 17:38

    How can I open and display the downloaded PDF file?

    Create a ContentProvider to serve the PDF file, then use an ACTION_VIEW Intent with the Uri to your ContentProvider to open it in the user's chosen PDF viewer.

    This sample project demonstrates how to serve a PDF file from internal storage.

提交回复
热议问题