| Reply | « Previous Thread | Next Thread » |
|
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 07: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 |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| is there PIM listener or address book listener? | luke_chenca@hotmail.com | Mobile Java General | 4 | 2006-06-13 10:23 |
| Listener problems with different Emulators | chrisbchrisb | Mobile Java General | 2 | 2006-04-24 08:55 |
| SMS port (Listener) | ysuter | General Messaging | 2 | 2005-11-02 18:46 |
| Testing TCP listener on emulator. | LearningCurve | Symbian Networking & Messaging | 0 | 2003-10-06 17:16 |
| Bluetooth Setting Detection with Listener | btuman | Bluetooth Technology | 3 | 2003-08-21 17:48 |