BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 03-16-2007, 10:54 AM   #1 (permalink)
New Member
 
Join Date: Feb 2007
Model: 8100
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Reading mail body text

Please Login to Remove!

Hi,

I have a problem with reading the mail content:
I use the getBodyText method of the Message class to get the Content of a Plain message. But i have the problem, that the maximum size of the returned string is 2000 characters. If i want to read a mail which is longer than 2000 characters the method just cuts the mail to 2000 characters.
Is there any solution for this problem?

If i check the inbox of my blackberry i can see the whole mail...


Thank you for your help

Michael
Offline  
Old 03-16-2007, 11:11 AM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I haven't done this, but as a guess, if you leverage the inputstream you can probably get a reader to push the entire thing to a string instead of 2k characters
Offline  
Old 03-16-2007, 12:31 PM   #3 (permalink)
New Member
 
Join Date: Feb 2007
Model: 8100
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for your fast reply. But even with a Stream it does not work. The result string of the stream has still the length 1999. Which is only the first part of the mail:

String current = "";
InputStreamReader ab = new InputStreamReader(folderevent.getMessage().getInpu tStream());

for (;;)
{
int data = ab.read();
// Check for EOF
if (data == -1)
break;
else
current+=(char) data;
}
Offline  
Old 03-16-2007, 04:17 PM   #4 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried pulling in a 6000 character message through the message api and it seems to work fine for me on the 7290 emulator running in the 4.0.2 api.

I would've suspected this was a problem with your device email settings whereby sometimes the mail client is set up to read only a set number of characters (perahps 2000), and leave you with a "more" request in the popup menu, which goes back to the server and gets the next batch. However as you say you can see the whole mail, that may not be the problem for you.
Offline  
Old 03-21-2007, 08:03 AM   #5 (permalink)
New Member
 
Join Date: Feb 2007
Model: 8100
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,
it really seems to be a problem with the device email settings. The device (the simulator and the real device) first receives 2000 characters of the mail. When i scroll down in the mail it requests the rest of the mail. After that request my application can read the whole mail.
But where can I set this mail size? (for the simulator and for the real device?)

Thanks
Michael
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LIA3420, This IC is found on Commodore Amiga 2000 board And is a Buster Chip
$11.0
LIA3420, This IC is found on Commodore Amiga 2000 board And is a Buster Chip  pictureMOS MPS 6520 Commodore Amiga Atari PIA 40-Pin PDIP Used
$10.0
MOS MPS 6520 Commodore Amiga Atari PIA 40-Pin PDIP Used  pictureGenuine Noches Latinas UR3 Amiga Parala La Palma Vagina Mastrubator + Cream Gift
$29.99
Genuine Noches Latinas UR3 Amiga Parala La Palma Vagina Mastrubator + Cream Gift pictureGenuine Noches Latinas UR3 Amiga Para La Palma Culo Mastrubator + Cream Gift
$29.99
Genuine Noches Latinas UR3 Amiga Para La Palma Culo Mastrubator + Cream Gift pictureCSG/AMIGA 391077-01 PLCC
$14.2
CSG/AMIGA 391077-01 PLCC picture






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