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
Administrator
MSohm
Posts: 14,521
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: ContentHandler and Email Attachments

 


goojo wrote:

Yes thats exactly what I have - still no luck - does this registration persist over device reboots - if so what what happens when the registration code runs on system start - do the new settings over write the old ones?

 

Going to clean the simulator and test again.

 


 

Registered content handlers do no persist across device reboots.

 

Note that a content handler does not change the behaviour of the Open Attachment menu option.  If a matching content handler is found for a given file type you should see a menu option titled Download Attachment.  If you select this the entire attachment should be downloaded, saved and your content handler invoked.

 

What BlackBerry Smartphone model and BlackBerry device software version are you testing on?  You can find this under Options, About on the BlackBerry Smartphone.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Contributor
goojo
Posts: 16
Registered: ‎07-28-2010
My Device: Bold 9700
My Carrier: Vodafone

Re: ContentHandler and Email Attachments

Hi Mark,

 

I'm testing on a Simulated 8520 running v5.0.0535 and a physical 9000 running v5.0.0.592 the previously posted code fails in both cases.

 

So if I understand what your saying correctly, if my ContentHandler was functioning as expted when I invoke the menu on the attachment I would see a "Download Attachment" option and this would be the path to invoke my handler (btw. I've never seen the Download Attachment option appear). 

 

If this is the case does that mean it's impossible for a 3rd party application to be supported via "Open Attachment". Wouldn't this lead to confusion for the end-user who has to be aware that the "Open Attachment" option will always result in an error message?

 

Thanks - John

 

 

// John Goodyear
Please use plain text.
Contributor
goojo
Posts: 16
Registered: ‎07-28-2010
My Device: Bold 9700
My Carrier: Vodafone

Re: ContentHandler and Email Attachments

I've been working on this problem since my last post and still have no resolution.

 

I'm starting to think its impossible to invoke some arbitrary file type from the mail app on the blackberry. 

 

My devices are: 9000 running 5.0.0.592 (physical) and any of the stock simulators that ship with the SDK. 

 

I always see an Open Attachment option which shows the "This attachment type cannot be viewed on your device" and have never seem the "Download Attachment" option mentioned by Mark in a previous post. 

 

Even CHAPI demo fails in all cases when using mail app. 

 

Is there something which would prevent the mail app from being able to invoke registered ContentHandlers, maybe BES settings or some default behaviour ? 

// John Goodyear
Please use plain text.
Administrator
MSohm
Posts: 14,521
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: ContentHandler and Email Attachments

Note that the opening of email attachments delivered via the Email Server Simulator or MDS-CS Simulator is not fully supported.

 

To test this you'll need to use a real BlackBerry Smartphone or a BlackBerry smartphone simulator connected to a BlackBerry Enterprise Server.

 

The Open Attachment option should only appear if the attachment can be viewed natively on the BlackBerry Smartphone.  The Download Attachment option applies to CHAPI.  You could get either menu item, or both, depending on the type of attachment you are trying to open.

 

The chapidemo should work with the mail application, but it will need to remain open.  That means you'd have to start up the demo, task switch to the messages application and open the attachment.  If you close the demo it'll fail to open.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Contributor
goojo
Posts: 16
Registered: ‎07-28-2010
My Device: Bold 9700
My Carrier: Vodafone

Re: ContentHandler and Email Attachments

I've finally solved my problems with content handler. I wanted to share back the results, and also thank you all for your help. Here's my summary:

 

1. Remember that the server simulator does not support attachments so you won't see the "Download Attachment" option if your simulated device is connected to the simulated server (that's in the doc's but I missed it first time round). 

 

2. Make sure your hardware device isn't connected an old Blackberry Profession Server - this was the problem we had, Once we upgraded to BES Express 5 the attachment stuff all started working. We had an old BPS 4.1.4 server which I think was the last version to not support download attachments. 

 

 

// John Goodyear
Please use plain text.
Developer
arindamhit
Posts: 271
Registered: ‎12-24-2010
My Device: BlackBerry 10
My Carrier: Airtel

Re: ContentHandler and Email Attachments

Hi John. Can you please share the code..I am also trying the same..

Please use plain text.