I send an email as an action, it works fine in gmail, but if the user selects any other email service, it replaces the spaces with "+"
like in body text is "check out it is a good day" it displays as "check+out+it+is+a+good+day"
Any idea how to solve these problems
Here is my email sending function
private void sendToAFriend() { String subject = "it is a good day "; String body = "Check out it is a good day"; String uriText = "mailto:" + "?subject=" + URLEncoder.encode(subject) + "&body=" + URLEncoder.encode(body); Uri uri = Uri.parse(uriText); Intent sendIntent = new Intent(Intent.ACTION_SENDTO); sendIntent.setData(uri); startActivity(Intent.createChooser(sendIntent, "Send email")); }
source share