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
Contributor
Posts: 41
Registered: ‎09-27-2010
My Device: Not Specified

able to open attachment with mail client but same file not able open after saving in phone memory

Hi,

My application handling the email attachments, few formats like .odt file I am able to open with email client.

but same file I download from my application and trying to open using the folloing code, it is saying no handler found to open this attachment,

 

Invocation invocation = new Invocation(attachment.getLocalPath());
invocation.setAction(ContentHandler.ACTION_OPEN);
invocation.setResponseRequired(false);
invocation.setType(ContentHandler.UNIVERSAL_TYPE);
Registry registry = Registry.getRegistry(Application.getApplication().getClass().getName());
registry.invoke(invocation);

 

how to use same handler which is email client using to open the attachment ?