Hi i have web application which uses mailto like
<a href="mailto:[email protected]?subject=This%20is%20the%20subject&[email protected]&body=This%20is%20the%20body" class="">Send email</a>
but no meter what i do it alway replace space with + sign
Try to decode your String
just use Uri.encode(String).
subject = (EditText) findViewById(R.id.subject);
subject.setText(Uri.encode(WhatEverYourStringVarIs));
This will help you to decode the URIencode.
If you mean the PHP (HTML) Issue just do the same:
$encodeString = urlencode($encodeString);
echo $encodedString;
So the String will displayed proper. See this url encode.
Okay, but when i'm read your Question the third time: You can use Spaces in these HTML case. It is an Android Bug. Just use this:
<a href="mailto:[email protected]?subject=This is the subject&[email protected]">Send Mail</a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With