Hi,
Cud anyone tell me in brief the role of listener, the flow of the listener in a program????
Thanks in advance!!
Dheeraj Gundapuneni.
Hi,
Cud anyone tell me in brief the role of listener, the flow of the listener in a program????
Thanks in advance!!
Dheeraj Gundapuneni.
Dheeraj,
Have you checked the SNAP Mobile developers guide at http://www.forum.nokia.com/info/sw.n..._1_en.pdf.html
The role of the listener is to get events from the server automatically. You can also poll the server for events manually (which requires more work and the application has to make sure it polls the server on regular basis, othewise the session might time out).
I would recommend you to also study the example midlets in the sdk as well as the SNAP HelloWorld tutorial available here
http://www.forum.nokia.com/info/sw.n..._1_en.pdf.html
Hartti
Hartti,
I was developing a sample game on snap mobile architecture following the sample code given by nokia (Maze racer).
My main problem is I was not able to exchange the data via comm.sendgamePacket(); I am sending the data but while listening to data (i.e through snapEventListener processEvents() ), I was not able to get constant integer value of id (i.e 116),so GAME_PACKET was never called .i couldn't proceed further .
While at present i managed and exchanged data using comm.sendBuddyMessage invoking processEvents((IMPS_IM_MESSAGE)) this is working fine .
Please help me out how to send data in comm.sendGamePacket() so that i can get 116 constant value at processEvents();
Thanks and Regards
Dheeraj Gundapuneni.
Last edited by gsdheeraj; 2006-08-30 at 06:42.
I was developing a sample game on snap mobile architecture following the sample code given by nokia (Maze racer).
My main problem is I was not able to exchange the data via comm.sendgamePacket(); I am sending the data but while listening to data (i.e through snapEventListener processEvents() ), I was not able to get constant integer value of id (i.e 116),so GAME_PACKET was never called .i couldn't proceed further .
While at present i managed and exchanged data using comm.sendBuddyMessage invoking processEvents((IMPS_IM_MESSAGE)) this is working fine .
Please help me out how to send data in comm.sendGamePacket() so that i can get 116 constant value at processEvents();
Thanks and Regards
Dheeraj Gundapuneni.
Hi,
make sure that your users are in the same game sending and receiving the game packets. Your users need to be logged in and gameStart() needs be called before users are able to sendGamePackets.
If you've already done that you should check what you get returned from sendGamePacket command. The ItemList may contain an error and you should also make sure to correctly process errors passed into SnapEventListerner's processServerError() method.
Hope this helps.
- Heidi