11-10-2011 04:51 AM
I have problem with Transport.more function. My application have to listen for incomming messages with attachments and download it for processing... ( I use JDE 4.2.1.) It works fine at devices with Blackberry 4.2.1 (it is minimal OS version that I habe to support). But I have issue with new devices (I have it tested with real device Blackberry 9330 and Blackberry 9360 (OS 7.0)).
I have class that implements FolderListener,MessageListener interfaces. Both of functions (messagesAdded(FolderEvent e) and changed(MessageEvent event)) are calling my function ProcessMessage. When I detect there that any part of message has more (hasMore() returns true) I call Transport.more function. But seems that there is no called code after this function. And I receive new event about this message (messadgeAdded)....it is processed by the same way and situations repeats infinitely...
Blackberry OS 5.0 documetation said: Note: Do not use this method to download an attachment. Instead, use AttachmentDownloadManager.(available from Blackberry API 5.0)
But is there any way to have the same code for all versions of BlackberryOS? Have anybody solution to have Transport.more worked at newest devices? Sure, I can compile two version for old devices (4.2.1) and new (5.0 and above). May be this way is not single way out from this situation?
At Blackberry 9360 Simulator function Transport.more works fine!