Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
tylerjames
Posts: 42
Registered: ‎10-06-2008
My Device: Not Specified

Email attachment speed

Hey everyone,

I'm working on creating email attachments programmatically but have found this works incredibly slowly compared to however RIM handles attachments when you do it from the email application.

I'm creating attachments using the method described here:

How To - Create an attachment Article Number: DB-00009 http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800698/How_To_...

 

Basically creating a Multipart that is made up of SupportedAttachmentParts.

 

The problem seems to be that in order to create a SupportedAttachmentPart you need to read all the data for file you are attaching into a byte array. This process can take quite a bit of time (tens of seconds when it comes to video). It seems like when you add an attachment manually from the email application that the attachment appears instantly which leads me to believe that RIM is doing things a bit differently.

Does anyone else have experience creating email attachments from large files (several hundred kb)? I would greatly appreciate it if somone could help me streamline this process.

 

Thanks in advance. 

Please use plain text.
Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: Email attachment speed

Seems that native email application uses non-documented native calls to create attachments much more faster.

 

 

Please use plain text.
Developer
tylerjames
Posts: 42
Registered: ‎10-06-2008
My Device: Not Specified

Re: Email attachment speed

Thanks for the help. I suspected this was the case.

 

It seems the more I program for BlackBerry the more frustrated I become with these dead-end APIs. If RIM really wants to stick it to Apple they need to spend some time beefing up their APIs and empowering developers to make better apps.

 

I'll try a few more things and let everyone know if I find an acceptable solution.

Please use plain text.
Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: Email attachment speed

If RIM wants to be on the market edge it needs to be more open to developers.

 

It is not because of Apple.

 

It is because of Android :smileyhappy:

Please use plain text.