To share a private file (e.g. a PDF) with another app securely, use:

  1. A file:// URI
  2. SharedPreferences
  3. FileProvider with a temporary content:// URI
  4. A public static variable
Answer

C) FileProvider with a temporary content:// URI

FileProvider grants temporary read access; file:// URIs are blocked since Android 7.

Computer Science MCQ · More UI Events, Views, Preferences and Data Storage MCQs · Practise