title: Get mailto value from email intent
body: <p>I created an app that is shown in <strong>email sending</strong> apps list . </p>
  
  <p>In a <strong>special app</strong> when user clicked on an email address , all of <code>email sending</code> apps apear on a list that my app is one of them and user can choose it.</p>
  
  <p>I want to <strong>save</strong> email when user click on my app . </p>
  
  <p>All things is fine but i dont know how i can get the emails from my app ? </p>
  
  <p>I know other apps use this code :</p>
  
  <pre><code>Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
              "mailto","abc@gmail.com", null));
  emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Subject");
  emailIntent.putExtra(Intent.EXTRA_TEXT, "Body");
  startActivity(Intent.createChooser(emailIntent, "Send email..."));
  </code></pre>
  
  <p>But i dont know how access these data placed in Extra . i need to fetch <code>mailto</code> value only from top code.</p>
  
  <p>How i can get <code>mailto</code> value now ?</p>
  
  <hr>
  
  <p><strong>Edit :</strong> </p>
  
  <p>I have one app that shared many email addresses but i cant copy them . these emails are only links when i click them android apears all email sender apps . i wan to get this email one by one using my developed application and save them in a txt file .</p>
  
  <hr>
  
  <p><strong>EDIT 2 :</strong> 
  I find a way to show my app in all other apps email sender list.i find out different applications used different methods to put extra content for sending email . 
  for solve this problem and show your application in all of other applications email sending list i used many <code>&lt;intent-filter&gt;</code> in my <code>AndroidManifest.xml</code> like this : </p>
  
  <p>Many apps used <code>ACTION_VIEW</code> method to send email . if you want show your application in this type of apps , you must use this code in your manifest file : </p>
  
  <pre><code>&lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.VIEW" /&gt;
                  &lt;data android:scheme="mailto" /&gt;
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
                  &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
              &lt;/intent-filter&gt;
  </code></pre>
  
  <p>Another type of apps used <code>ACTION_SEND</code> to provide intent for calling email sender apps list . and if you want to show your app in these type of apps you must add this code to your <code>AndroidManifest.xml</code> file and your <code>Activity</code> tag : 
  You can see 3 method to provide intent , i found these ways to show my app inside all apps email sending list maybe another methods exist and i dont know right now:</p>
  
  <pre><code>&lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.SEND"/&gt;
              &lt;category android:name="android.intent.category.DEFAULT"/&gt;
              &lt;data android:scheme="mailto"/&gt;
          &lt;/intent-filter&gt;
  
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.SEND"/&gt;
              &lt;category android:name="android.intent.category.DEFAULT"/&gt;
              &lt;data android:mimeType="text/*"/&gt;
          &lt;/intent-filter&gt;
  
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.SEND"/&gt;
              &lt;category android:name="android.intent.category.DEFAULT"/&gt;
              &lt;data android:mimeType="message/*"/&gt;
          &lt;/intent-filter&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>EDIT 3</strong> : i used this code in my activity : </p>
  
  <pre><code> bundle = intent.getExtras();
                  if (bundle != null) {
                      for (String key : bundle.keySet()) {
                          Object value = bundle.get(key);
                          Log.d("Extra : ", String.format("%s %s (%s)", key,
                                  value.toString(), value.getClass().getName()));
                      }
                  }
  </code></pre>
  
  <p>And now i get log : </p>
  
  <pre><code>D/Extra :: android.intent.extra.EMAIL [Ljava.lang.String;@2244b9ca ([Ljava.lang.String;)
  </code></pre>
  
  <p>it shows i have one value in extra and its name is android.intent.extra.EMAIL but i cant get this value . i tested many ways ! </p>