Issue
I want to send message with many new line or some bold text or also with some hyperlink
For example: Below is my code
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);
String model = Build.MODEL + ", " + Build.MANUFACTURER;
nameValuePairs.add(new BasicNameValuePair("message", "Your Last Alert: On "+mDate+" at "+mTime+", "+ model +" reported that its battery level was down to "+batteryLevel+". You might want to get it on a charger before it's too late!   Do you know where "+model+" is? </br></br> Click "+s+" to view in Google Maps.\n To find "+model+" with the Last Alert app on Android-phone, click here. \n\n\n\n\n\n Last Known Location : \n San Francisco California United States 94108"+"\n\n\n\n\n GPS Coordinates \n"+lat+", "+lon+"Altitude\n"+alt+"\n\nLocation Accuracy"+"16.40ft Diameter"));
I have used
for space, <br>
for new line also \n
for new line but the problem is message in sent in only plain text only ( i have sent mail in gmail which is my account)
like below
Your Last Alert: On 10/04/2012 at 03:23 pm, LG-P500, LGE reported that its battery level was down to 100. You might want to get it on a charger before it's too late!   Do you know where LG-P500, LGE is? Click https://maps.google.com/maps?q=0.0,0.0 to view in Google Maps. To find LG-P500, LGE with the Last Alert app on Android-phone, click here. Last Known Location : San Francisco California United States 94108 GPS Coordinates 0.0, 0.0Altitude -1.79769313486231E308 Location Accuracy16.40ft Diameter
Solution
A guess.. Try replacing "</br></br>
" with "<br/><br/>
". This may solve your problem.
Answered By - Kartik Domadiya
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.