0

I am developing an android application, and I have a need something below.

I want to download a PDF from my server and store it into the cache Dir or internal storage, so the user cannot get it as it will be premium content.

I have already tried it with '.' directory and creating '.nomedia' file so the third party application will not be able to show my PDFs.

But there is some file explorer which allows the hidden folder to be shown in that case the user can easily find my content.

I want to prevent that.

I am using the download manager to download PDFs.

Did anyone have the solution to this problem?

Thanks in advance.

Reza Mousavi
  • 4,420
  • 5
  • 31
  • 48
Hardik Chauhan
  • 2,750
  • 15
  • 30
  • 1
    `DownloadManager` has no ability to download to [internal storage](https://commonsware.com/blog/2017/11/13/storage-situation-internal-storage.html). Download the PDF yourself (e.g., OkHttp) to internal storage. – CommonsWare Oct 08 '18 at 11:56
  • I have this same question in mind! but I have bought about some simple way around it for now! what I plan on doing is to encrypt the file and make only the app able to decrypt when user is about to read it. check this out https://stackoverflow.com/a/26648114/7667720 – Wale Oct 08 '18 at 11:57

0 Answers0