title: How to get gmail attachment into local device store with intent filter
body: <pre><code>In my application i want to open gmail attachment with my application, i used intent filter for that, 
      I am getting URI and i want to use that and copy that attachment to my local device and want to display that with my application .
  
      url = {content://com.google.android.gm.sapi/abc@gmail.com/message_attachment_external/%23thread-f%3A1610966348228029097/%23msg-f%3A1610966348228029097/0.1?account_type=com.google&amp;mimeType=application%2Foctet-stream&amp;rendition=1}
  </code></pre>
  
  <p>After a days of research and implementation, Here is a final solution for gmail attachment file , to view and down load in our application.</p>
  
  <pre><code>[IntentFilter(new string[] { Intent.ActionView }, Categories = new string[] { Intent.CategoryDefault, Intent.CategoryBrowsable }, DataScheme = "content", DataMimeType = "application/octet-stream")]
  
  Stream inputsTream = resolver.OpenInputStream(url);
                          fs = File.Create(fileName);
  
                          byte[] buffer = new byte[32768];
                          int count;
                          int offset = 0;
                          while ((count = inputsTream.Read(buffer, offset, buffer.Length)) &gt; 0)
                          {
                              fs.Write(buffer, 0, count);
                          }
                          fs.Close();
                          inputsTream.Close();
  </code></pre>