How to recover attachments programmatically?

Halo

I am a new Blackberry Application programmer.

I create a program that reads automatically from the store, using FolderListener.

When I got FolderEvent event, I got the Message that is instanceof Multipart.

I create BodyPart of Multipart, to access my attachment. (index number 1 in the body)

When I check bodypart.hasMore () is to return true.

I do Transport.more (bodypart, true);

I create a loop to check bodypart.hasMore (), up to 2 minutes it still true

(found the attachment on server).

why I can't finish my message?

(the bodypart.hasMore () never return false).

y at - it anyway reach to get the attachment from Message (mail api)?

My attachment is a binary to base64 format, it size only 100 bytes.

I have no idea, my attachment included in message (2K bytes of first)?

Any help would be appreciated.

Thank you.

Please take a look at this example.

What is - delivery content of attachment to a BlackBerry device
Article number: DB-00475

http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

Version 4.5.0 blackBerry device software offers the possibility to access attachments without using an AttachmentHandler.  The following link explains it.

How - e-mail access HTML
Article number: DB-00666

http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800698/How_To _...

It shows how to get the HTML parts or text of an e-mail message, but the same principles can be applied to attachments.  Note that this requires a BlackBerry Enterprise Server or BlackBerry Internet Service account.  The ESS and MDS simulators do not support HTML email delivery.

There is also a problem in some early versions of version 4.5.0 which prevents you to ask more than one attachment (using the second method).  It is corrected in version 4.5.0.47 BlackBerry device software and higher.

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for

  • Can not backup iPhone to iTunes apps

    I'm I searched this problem and none of the answers make sense to me. Problem... I bought a new iPhone 6 for my wife. I plugged the sound 5 s to iTunes to make a back up. When I connected the new phone and choose to use the backup to configure the ph

  • If I have Windows XP with Service Pack 3 installed, can I uninstall SP2?

    I have the original installation disc of Windows XP Home Edition with Service Pack 2.  I've upgraded to Service Pack 3.  From Add/Remove Programs, now uninstall Service Pack 2? http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-windows_insta

  • How to open the CD player?

    It seems to be a region for a CD player. It is the right size and shape. However, I looked everywhere for a button and cannot find one. My laptop is a HP 15. A follow-up to the issue; I looked in the device for the player manager. I'm not sure what w

  • Highlight line ObjectListField

    How can I change the highlighted line to have just a red border around it? This means that the entire line fill area should not be highlighted. Only a red box around the current line. Thank you

  • Booting from the cdrom

    Just got a brand-new 4235 ID device but there 2.2.5.1 on it. I have the 3.0 (1) S4 upgrade CD. But how do you repair the unit to boot from it? I have a pc keyboard and monitor directly connected to the probe. Do I have to change the boot settings in