| Reply | « Previous Thread | Next Thread » |
|
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? |
|
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 |
|
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. |
|
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 |
|
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.
|
|
I've switched to SDK 1.2 and now there's "fromID" inside 307 ItemList which I use to change local friends list.
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| 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 |