BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 06-06-2007, 10:03 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2007
Model: 8700
PIN: N/A
Carrier: O2
Posts: 24
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default get to rest of message from transport.more

Please Login to Remove!

Hi folks,

Hoping somebody can make sense of something for me. I've 'inherited' a bberry app and I've managed some significant progress with it, but not being a Java developer I think I'm missing some of the "Java 1.0.1" essentials...

Essentially, I have a Message object from which I've subtracted a BodyPart. I have checked to see if the BodyPart hasMore and it has. I have issued Transport.More to get more, and it does. I can not now for the life of me get to the rest of the content.

This is what I have (embarrasing...) :

BodyPart msgbp = (BodyPart)msg.getContent();
if (msgbp.hasMore()){
System.out.println("Msg has more - fetching...");
net.rim.blackberry.api.mail.Transport.more((BodyPa rt)msgbp, true);
System.out.println("Updating body text container...");
mail = (String)msgbp.getContent() ;
System.out.println("Mail body now : "+mail);
}

Notes :

msg is a message resulting from folder.getMessages, msg is specifically msgs[i] and this is in a loop.

mail is a string created earlier and is msg.getBodyText(). I use this string to see if the message is one my app is 'interested in'... basically the mail variable is the same before I get more and after so I don't know how to refresh the object, I've tried a number of things...

Thanks in advance for any assistance...
Offline  




Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.