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
Regular Contributor
Posts: 77
Registered: ‎02-17-2010
My Device: Not Specified

listening incoming mails

hi,

 

am new to bb developent.i need help

is there any way to listen incomming mails in blackberry?(programmatically)

please guide me regarding this topic.

Developer
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: listening incoming mails

Searching the forums will give you the best answers... However, I will point you in the right direction.

 

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800783/How_To_...

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Developer
Posts: 74
Registered: ‎01-03-2010
My Device: Not Specified

Re: listening incoming mails

You have to override abstractphonelistener/ phonelistener class try to search them in forum. Few of

them total code implementation. Also you can use notifications with it. Incoming call handling is fairly

simple but UI part is slightly complex but it can be done.

 

 

 

Please give kudos (click star on the left) if you feel response is helpful. Click "Accept as solution" if post was what you needed.

Developer
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: listening incoming mails

[ Edited ]

They're actually looking for incoming e-mails not phone calls.

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Regular Contributor
Posts: 77
Registered: ‎02-17-2010
My Device: Not Specified

Re: listening incoming mails

thanku so much jcarty.. ur link really helped me lot

 

actually when comes to alternate entry points,i should create two projects right?

one which holds al source code and other project  with application icon and alternate entry point along with system module and auto-run on stratup option checked.

 

am i right or confused ?

Developer
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: listening incoming mails

[ Edited ]

It depends on which development tool you're using. In Eclipse Java Plugin 1.1, you just need one project. In JDE or Eclipse plugin 1.0, you need two.

 

In the case that you need two, the last part of your message is correct. Just make sure that you set up an argument like in the example of the link I posted (i.e. init or startup).

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Regular Contributor
Posts: 77
Registered: ‎02-17-2010
My Device: Not Specified

Re: listening incoming mails

hi,

 

ya thanks for the reply.. mine is 1.0 so i need to create two projects.

i have some doubts regardign the link u sent..

 

there as soon as an incoming mail arrives the below function wil be invoked rt?

  folderListenerGUI.invokeAndWait(new Runnable()
        {
          public void run()
          {
            //Call the NewMailArrived method to update the
            //screen with a notification.
            folderListenerGUI.NewMailArrived();
          }
        });
i need to parse incoming mail based on some critiria and should update my application screen accordingly....

i need to add my code in NewMailArrived(); rt?

can i write code like to push my application screen ?

 

i got these doubts because still i havent chekd it on handset. so



Developer
Posts: 74
Registered: ‎01-03-2010
My Device: Not Specified

Re: listening incoming mails

 try to use notification for this..............

 

 for alternate entry point see this http://supportforums.blackberry.com/t5/Java-Development/Tutorial-Communicate-between-apps-processes/...

 

sorry for previous goof (mail or call)

Developer
Posts: 81
Registered: ‎07-16-2008
My Device: Curve - 8320
My Carrier: AirTel

Re: listening incoming mails

It depends on the actual application where you would write your code. As far as this referred application is concerned-

 

You can write UI specific code in the GUI application's NewMailArrived() method.

If you need to do some processing at backend application (the Listener), then write your code when you get notification of new email arrieval, i.e. in FolderListenerApp.messagesAdded() method.


*(Vipul)() ;
Regular Contributor
Posts: 77
Registered: ‎02-17-2010
My Device: Not Specified

Re: listening incoming mails

hi i got some exception while runnng on handset. in the below function ........... i added code to extract sender address public void messagesAdded(FolderEvent e) { public void messagesAdded(FolderEvent e) { strsender =e.getMessage()..getFrom().getAddr().toString(); ;;; } then am sending this address to this function folderListenerGUI.NewMailArrived(strsender); is this correct or not ?