title: How to show PDF from base64 String
body: <p>I am receiving an encoded base64 string for a PDF file and I would to show it inside a fragment with a Floating Action button that can be used for saving or printing the pdf.</p>
  <p>I have tried <a href="https://stackoverflow.com/questions/56629022/how-to-show-pdf-from-base64-string-on-android">this solution</a> but it didn't work out for me because it was complaining about <code>exposed beyond app through Intent.getData()</code>. It probably has something to do with the write access. I do have <code>&lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;/&gt;</code> in my Manifest but I also have a warning that <code>write_external_storage no longer provides write access when targeting android 10+</code>.</p>
  <p>Anyhow, in that solution, it tries to save the pdf first then open it. Is there any way around it? To just simply show the pdf and then provide a button to save it?</p>
  <p>Screenshot of what I want to achieve:
  <a href="https://i.stack.imgur.com/KGFmW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KGFmW.png" alt="enter image description here" /></a></p>