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
Highlighted
Contributor
Posts: 16
Registered: ‎07-28-2010
My Device: Bold 9700
My Carrier: Vodafone

File name for SupportAttachmentPart

I've implemented a sendMessage handler to intercept outbound email messages, I'm using some sample code from the docs to transverse the Message object and break it down into its seperate parts. 

 

When I find a "SupportedAttachmentPart" I need to access the attached file I want to get to the file name of the attachment too, for an attached image this is typically:

 

file:///SDCard/BlackBerry/camera/IMG-20120326-00060.jpg

 

This fine as I can parse out the filename part. However if the image resize option is used during attachment the file name is:

 

file:///SDCard/tmp/SU1338997006757.tmp

 

I have checked both "getName" and "getFIlename" methods and both return the .tmp name as above. 

 

Is there a way to get the real filename from the SupportedAttachmentPart object during sendMessage processing?

 

Regards

John


 


// John Goodyear