Blackberry JAVA DEVELOPMENT ENVIRONMENT - - DEVICE APPLICATIONS INTEGRATION - DEVELOPMENT GUIDE Integration Manual page 19

Blackberry device applications integration guide
Table of Contents

Advertisement

String type=bp.getcontentType();
if(type.equals(ContentType.TYPE_TEXT_HTML_STRING){
// HTML text
}
else if( bp instanceof TextBodyPart){
} //end else if
}//end if
}// end for loop
}end if
else if(mp.getContentType().equals(ContentType.MULTIPART_MIXED){
for(int i=0;i<mp.getCount();i++){
BodyPart bp =mp.getBodyPart(i);
if(bp instanceof MimeBodyPart){
MimeBodyPart mbp=(MimeBodyPart)bp;
if(type.equals(ContentType.TYPE_TEXT_HTML_STRING){
// Plain text
Multipart mp=(Multipart)mbp.getContent();
if(mp.getcontentType().equals(ContentType.MULTIPART_ALTERNATIVE){
BodyPart xp=mp.getBodyPart(i);
if(xp instanceof MimeBodyPart){
String type=xp.getcontentType();
}//end if
}//end if
// HTML text
}
else if(xp instanceof TextBodyPart){
// Plain text
} //end else if
3: Work with a message
19

Advertisement

Table of Contents
loading

This manual is also suitable for:

Java development environment 4.6.0

Table of Contents