• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

J2ME project

 
tracy teo
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.. I need some help with my J2ME project. I'm doing a wireless vehicle security & alert system for my final year project. The project is roughtly about, when your vehicle is being used by unauthorized persons, an alarm will trigger and send a sms to inform the owner so the owner can take action. However, maybe due to poor reception, the owner might not receive the 1st sms. Therefore, I have to do something like maybe 10mins later if there is no any reply sms by the owner, i have to send out the same sms to him again. I have to send out at least 5 times if there is no reply from him(for every new sending, the time interval mus be longer eg. 1st time 5 mins, 2nd time 10 mins..). If after sending maybe the 3rd time, the owner send back a command, than I have to get out of the sending loop and carry out the command send by the owner(Maybe to trigger back the alarm). So now I'm not sure of how to get out of the loop if by the 3rd time or anytime, there is a reply message by the owner and also not sure how to increase the time interval.. Another porblem is that I'm not very sure of how to apply Watchdog into the program to check for hang or errors. What must be included in the watchdog setup? Hope someone can get back to me as soon as possible.. thanks
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I would register the All the Timers at once, each at the different intervals, maybe take the exact time at the point you want the first SMS to go out then add 5 to your interval variable and register the next one. Register all five.

Then using Push Registry, when a message is received from the owner, it goes an removes the remaining registered Timers. No looping involved.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic