In various Android applications, I use the following code to show the choice of an application for email, and after the user decides to select one of the applications, paste the 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) {
In a for-loop, the output of a string of objects is concatenated with the temporary string "contentStr". After each object there should be a line break ("\ n").
Therefore, when I test this code on my phone, it works fine, and each individual object has its own line.
But users report that their email application (Android standard also) puts everything on one line and ignores line breaks.
So am I doing something wrong? Or can I just ignore this error report as it is not a problem that the developer can solve?
source share