You Are Here:

Community: Developer Discussion Boards

#1 Old Question Getting players' presence - 2006-07-06, 11:53

Join Date: Jun 2006
Posts: 14
czubaka
Offline
Registered User
Hi,
How can I get friends' presence?
I know that when friend's presence changes I get event 307 (IMPS_IM_PRESENCE).
However, when player logs-in he/she needs precense of friends at the moment of login. How can I get it?
Reply With Quote

#2 Old Re: Getting players' presence - 2006-07-07, 19:34

Join Date: Jun 2006
Posts: 25
SM Tech
Offline
Registered User
If you are using the extendedLogin function of the API, a client is automatically logged into the IMPS subsystem. In addition, that function will automatically set your client's IMPS presence to available. Once you login and declare your presence to IMPS, the IMPS server will automatically send you all presence status of friends who are online.

Try logging in 2 clients who are friends and then log in a 3rd. Watch how the presence of the first 2 friends are automatically sent to the 3rd friend immediatly after login.

Please not that you must have started the snap event listner to receive these asyncronous events.

Thanks,
Matt
Reply With Quote

#3 Old Exclamation Re: Getting players' presence - 2006-07-14, 21:21

Join Date: Jun 2006
Posts: 14
czubaka
Offline
Registered User
Hehe, and I was wandering why I got those 307 notifications after logging ;-)

Now I'm trying to parse stuff from 307. Could you please tell me what "presence" string is build of? I got: v=1.0,0,29555,0,Game=1. I believe third number is game class ID. What are other things?

BTW, it seems there's some mistake in documentation - SNAP Game Dev. Guide 2.1 says that 307 has "fromUserID" and "fromUserName" members. In fact SNAP sends ItemList with "snapUserID" and "fromName" inside.
Reply With Quote

#4 Old Re: Getting players' presence - 2006-07-14, 21:49

Join Date: Jan 2004
Posts: 13
splandorf
Offline
Registered User
Hi,

If you are getting a presence string inside of IMPS_IM_PRESENCE updates that looks like this:

"v=1.0,0,29555,0,Game=1"

Then I believe you are using an older (deprecated) version of the client and/or server emulator. One of the biggest differences moving to the v1.1.1 release (and also in the brand new v1.2 release) is a new expanded way of handling presence that both:

1) Parses apart presence information into separate return values for you (so you don't have to manually parse apart presence information embedded in a string like the one above)

2) Returns much more information about each user

You should make sure you are running with the latest releases of the client and the emulator --- both are available as of today/yesterday at:

http://snapmobile.nokia.com/n-gage/w...obile_v1_2.zip

(the server emulator is inside the /tools directory).

The new version will not require you to parse apart any Presence strings to get user info (apart from your own application-specific uses for the Presence string -- which now has no default contents, only what you choose to put in it.)

If you believe you are already running with the latest versions of the client/server, please post back! Your presence string looks like an older version (pre-March 2006 release), so I would be eager to find out what is going on...

As for the API documentation, you may also have a mismatch between API versions and documentation versions... I will double check.

Thanks,
Sam
Reply With Quote

#5 Old Re: Getting players' presence - 2006-07-14, 22:01

Join Date: Jun 2006
Posts: 14
czubaka
Offline
Registered User
I've been using SDK 1.1.1 version. As for server I don't use emulator but live server (unfortunatley I don't know which version). I'll try to switch to SDK 1.2 and see what happens.
Reply With Quote

#6 Old Thumbs up Re: Getting players' presence - 2006-07-17, 12:07

Join Date: Jun 2006
Posts: 14
czubaka
Offline
Registered User
I've switched to SDK 1.2 and now there's "fromID" inside 307 ItemList which I use to change local friends list.
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
Q: How to override player's streaming proxy settings through MMF API? suckho General Symbian C++ 0 2005-10-06 09:35
Presence server disconnect after calling EdwinZ Smart Messaging 1 2004-07-08 12:56
Nokia Presence Server laurapacini Smart Messaging 0 2003-05-26 17:47
Nokia Presence Server laurapacini General Messaging 0 2003-05-26 17:46
Nokia Presence Server laurapacini General Messaging 1 2003-05-26 14:42

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: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d127641X 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