×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    6

    Listener / sendGamePacket

    Hi,
    Cud anyone tell me in brief the role of listener, the flow of the listener in a program????

    Thanks in advance!!
    Dheeraj Gundapuneni.

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Listener

    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

  3. #3
    Registered User
    Join Date
    Aug 2006
    Posts
    6

    Re: Listener

    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.

  4. #4
    Registered User
    Join Date
    Aug 2006
    Posts
    6

    sendGamePacket

    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.

  5. #5
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    59

    Re: Listener / sendGamePacket

    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

Similar Threads

  1. is there PIM listener or address book listener?
    By luke_chenca@hotmail.com in forum Mobile Java General
    Replies: 4
    Last Post: 2006-06-13, 09:23
  2. Listener problems with different Emulators
    By chrisbchrisb in forum Mobile Java General
    Replies: 2
    Last Post: 2006-04-24, 07:55
  3. SMS port (Listener)
    By ysuter in forum General Messaging
    Replies: 2
    Last Post: 2005-11-02, 17:46
  4. Testing TCP listener on emulator.
    By LearningCurve in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2003-10-06, 16:16
  5. Bluetooth Setting Detection with Listener
    By btuman in forum Bluetooth Technology
    Replies: 3
    Last Post: 2003-08-21, 16:48

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×