In various Android applications, I use the following code to show an application chooser for email and, after the user has decided for one of the apps, insert a predefined text into the email form:
final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/text");
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] { "info@example.org" });
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Sample subject");
String contentStr = "";
for (Object o : mArrayList) { // mArrayList: ArrayList<Object>
content = contentStr+o.toString()+"\n";
}
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, backupStr);
startActivity(Intent.createChooser(emailIntent, "Choose application"));
In the for-loop, the objects' string output is concatenated with the temporary string "contentStr". After every object, there should be a line break ("\n").
So when I test this code on my phone, it works fine and every single object has its own line.
But users report that their email application (Android standard as well) puts everything in one line and ignores the line breaks.
So am I doing anything wrong? Or can I just ignore this bug report as its not an issue which the developer can solve?