| Author |
How to wait for messages alert
|
Jas Oberai
Ranch Hand
Joined: Jan 16, 2005
Posts: 231
|
|
Hi Friends, I have a java web application.I want to automate it.Right now,when I click the "submit button",my appln reads messages from the phone sim card(attached to my pc),queries the database and then automatically sends a response back to the originator. How to automate this,such that my java program automatically knows that a new message has arrived on the phone and read that message and send the response back. Please suggest some easy way. Thanks
|
SCJP 1.4 (88%)<br />SCWCD 1.4 (88%)
|
 |
Ajay A Patil
Greenhorn
Joined: Apr 13, 2006
Posts: 22
|
|
You might have to keep polling the phone to check for new messages. See java.util.Timer class on how to execute your program after every 'n' minutes.
|
 |
Jas Oberai
Ranch Hand
Joined: Jan 16, 2005
Posts: 231
|
|
|
That was one way,I was thinking.But isn't there any way to listen to some port or something that notifies you when a new message arrives...thanks a lot.
|
 |
Jas Oberai
Ranch Hand
Joined: Jan 16, 2005
Posts: 231
|
|
Hi, I wrote this class to run every 5 seconds but it executes only once,can someone please tell me where i am going wrong Thanks
|
 |
Ajay A Patil
Greenhorn
Joined: Apr 13, 2006
Posts: 22
|
|
Remove this line.
|
 |
 |
|
|
subject: How to wait for messages alert
|
|
|