BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/index.php)
-   Developer Forum (http://www.blackberryforums.com/forumdisplay.php?f=15)
-   -   Trying to make a mail brower for a Bluetooth app (http://www.blackberryforums.com/showthread.php?t=42512)

smudboy 07-31-2006 09:32 AM

Trying to make a mail brower for a Bluetooth app
 
I'm trying to use the mail api to construct a simple browser for displaying all the email on the device (sim: bb 7520). The point of this is to individually export an email over to another computer via Bluetooth.

I've already created a simple menu item and system for the function (which already does the address book/contact info.) What I want to do is:
-Have an email browser that lists all the email folders that have email in them, with a number corresponding to how much email (similar to the search application. e.g. "Inbox (5), Sent (10)", etc.)
-Enter a folder that displays the emails, and, have a menu that, once you select an email listed, you can then choose what to do with it (how to send it to your PC, as text, html, etc. -- I'm having a slight problem with the net.rim.device.api.ui.UiApplication library, in making more than one UI in one instance of a class)
-I've already figured out how to list the contents of existing folders (i.e. Outbox), but I don't know how to handle the "folder not found" error message
-According to the API, there are 11 folders (e.g. DRAFT, DELETED, FILED, INBOX, INVALID, ORPHAN, OTHER, OUTBOX, SENT, SUBTREE, UNFILED), and I'm not too sure how to check or access subfolders.

Any code would be greatly appreciated. Thanks!

smudboy 07-31-2006 10:40 AM

Update
 
Ah, I found the FolderNotFoundException, which allows me to loop through the folders that do exist and do have emails in them. Now I just have to list and make a popup menu for it...

smudboy 07-31-2006 01:10 PM

Trying to access email list.
 
Now that I've listed all the folders that have email, I'd like to know how to:

1) track what the cursor has selected in the list when the track wheel is clicked

It looks like I have to implement the TrackwheelListener class in order to select my list (which are a list of folders):

I'm looking at these two examples:
"How to - Make list items appear on a screen"
&
"BlackBerry Application Developer Guide Volume 1"
from the Technical Knowledge Center at blackberry.com
(I can't post links because I haven't hit the 10 post limit.)

How would you recommend to do this?

smudboy 08-01-2006 12:24 PM

ViewListener
 
I'm trying out ViewListener. I can list the emails, but I need to know which one is selected in the ListField. How do I do so?

smudboy 08-02-2006 11:38 AM

ListCallback
 
I got the program working with the ListCallback class on the knowledge center. I didn't even need the TrackwheelListener implementation.

Now I'm working on retrieving emails...oh...fun!

smudboy 08-03-2006 11:47 AM

Hey I got it working!

Just need to try catch everything and catch those exceptions, then do work in that block for iterating through a loop properly! Lots of get get operations from the Message class, but, yeah, finally works!


All times are GMT -5. The time now is 02:47 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.