You Are Here:

Community: Developer Discussion Boards

#1 Old Listener / sendGamePacket - 2006-08-25, 08:47

Join Date: Aug 2006
Posts: 6
gsdheeraj
Offline
Registered User
Hi,
Cud anyone tell me in brief the role of listener, the flow of the listener in a program????

Thanks in advance!!
Dheeraj Gundapuneni.
Reply With Quote

#2 Old Re: Listener - 2006-08-26, 00:59

Join Date: Apr 2003
Posts: 6,408
Location: USA, CA
hartti's Avatar
hartti
Offline
Nokia Expert
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
Reply With Quote

#3 Old Re: Listener - 2006-08-30, 07:24

Join Date: Aug 2006
Posts: 6
gsdheeraj
Offline
Registered User
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.
Reply With Quote

#4 Old sendGamePacket - 2006-08-31, 10:25

Join Date: Aug 2006
Posts: 6
gsdheeraj
Offline
Registered User
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.
Reply With Quote

#5 Old Re: Listener / sendGamePacket - 2006-09-01, 00:05

Join Date: Mar 2006
Posts: 59
heihauki's Avatar
heihauki
Offline
Forum Nokia Expert
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 With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
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

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d89809X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZgamesQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ