android: open a pdf from my app using the built in pdf viewer

前端 未结 9 1757
温柔的废话
温柔的废话 2020-11-29 04:46

This was my original question:

I want to be able to open a pdf file in my app using the android\'s built in pdf viewer app, but i dont know how to

9条回答
  •  广开言路
    2020-11-29 05:18

    Although this is a pretty old topic, here is a solution for opening a PDF that is in the asset/ folder with an external PDF reader app. It uses a custom content provider: https://github.com/commonsguy/cwac-provider

    Using this you can define any file to be provided from the assets/ or res/raw/ folder.

    Try it! Best and easiest solution I found so far.

提交回复
热议问题