How do I make a PDF file in the assets of my APP open by the native PDF reader of android? [duplicate]

-1

I have an APP that needs to open some PDF files (laws) that should come along with the application.

The idea is to call an Intent to open these PDF files by the native Android PDF reader itself or a PDF reader already installed on the phone. The files are in the assets (inside the res directory). How do I open the external PDF reader and intend to open the PdF with the path of the file that is in the assets?

I've tried several things and still can not. Please help me!

    
asked by anonymous 26.06.2018 / 14:57

1 answer

0

file://android_asset is visible only to your app. You are wanting another application to open a file from the assets folder it does not have.

What you can do is copy this file to the internal or external directory and then try to read it.

    
26.06.2018 / 15:11