BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 06-03-2009, 09:52 PM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: Globe
Posts: 52
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Downloaded Files Listener

Please Login to Remove!

Hi,


I registered a ContentHandler for a specific unsupported file.

I want that the ContentHandler handle the file when the file is downloaded from an email and saved into the phone memory or SD card, before they are even opened by the user.

Is there an ACTION for this in the ContentHandler? I tried Save and New but it doesn't seem to work.

Or is there another way to solve this?

Please help!


Thanks,
Jaclyn
Offline  
Old 06-05-2009, 10:04 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

ContentHandler is called when the user clicks on your attachment.

If you want to intercept the mail before it hits the inbox, then you will need to use FolderListener.

See the API docs for Message, FolderListener, FolderEvent, and Store.
Offline  
Old 06-05-2009, 08:11 PM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: Globe
Posts: 52
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I see...

Thank you for that information.

I have another question, though...

I registered a ContentHandler with types "text/abc" and "application/octet-stream". The purpose of the first type is for files that have file extensions of .abc, while the latter is for the BB Mailer to recognize that it is a supported format. I added the "application/octet-stream" type so that the file can be opened through the "Download Attachment/Open Attachment" command from the BB Mailer.

But here's the problem...

The suffix that i registered is .abc. But when i download a file that is of .def extension, it still gets handled by the ContentHandler. I think it has something to do with the "application/octet-stream" type, but i specified only .abc suffix. How come the .def invokes the ContentHandler?
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.