You can use mailto request parameters as jondavidjohn says, as well as additional intentions, and you can mix and match them both. For example:
<intent android:action="android.intent.action.VIEW" android:data="mailto:xxxxx@xxxxxxx.com?subject=this is a test subject"> <extra android:name="android.intent.extra.TEXT" android:value="This is a test" /> </intent>
... will allow you to establish the body of the letter as well as the subject. You can also specify a topic as an additional. It also allows the use of XML string resources, rather than hardcoding:
<extra android:name="android.intent.extra.SUBJECT" android:value="@string/email_subject" />
I just grabbed the optional Intent names from Intent.java; all email related are all in a bunch.
I just discovered this and haven't done much testing, but it seems to work with my GMail email client.
Also, if that helps, I have had success using the mailto: URI body, for example.
mailto:example@example.com?subject=This%20is%20a%20subject&body=This%20is%20a%20body
Don't know if this helped me with the URL of my email url; I just did it out of habit based on the web background. But it definitely works and installs the body in GMail and K9 Mail applications.
Matt Gibson Mar 12 2018-12-12T00: 00Z
source share