title: How to get pdf file data from whatsapp to my app in android?
body: <p>In my application, I want to open a pdf file from the WhatsApp application to my app. I need to send that pdf file data to server I can't able get the proper path. Please give me any suggestions to get the file path along with the base64 encoded data. Thanks in advance.</p>
  
  <p>I can able to show the pdf in my application through URI. </p>
  
  <p>In my manifest file </p>
  
  <pre><code>&lt;activity android:name= ".activities.MyActivity"
                            ........&gt;
  
      &lt;intent-filter tools:ignore="AppLinkUrlError"&gt;
          &lt;action android:name="android.intent.action.VIEW" /&gt;
          &lt;action android:name="android.intent.action.SEND" /&gt;
          &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;data android:mimeType= "application/pdf" /&gt;
          &lt;data android:host="*" /&gt;
      &lt;/intent-filter&gt;
  &lt;/activity&gt;
  </code></pre>
  
  <p>when I am trying to get the exact file path from URI it is coming like "content://com.whatsapp.provider.media/item/4" from this file how can I get the <code>base64data</code>?</p>