Detecting if the client doesn''t supports Activities

Hi

I'm testing an activity and having some problems because I don't know how to detect whenever the client doesn't supports activities (old Messengers, web messenger, PocketPC Messenger...).

Looking atWLMActivityUtilities.pkg I found this procedure:

procedure MSNSLPUserCanNotOpenP4Window()

I’ve tried overriding it to show a message to the user and log an exception (just to test it before doing actual cancellation code):

procedure overrides MSNSLPUserCanNotOpenP4Window()

- Your client doesn't support activities.
call inherited MSNSLPUserCanNotOpenP4Window()

I’ve tried connecting from MSN Web Messenger (MS oficial web-based client) and the problem is that the procedure is never called/triggered.
The Agent says the words previous to send the invitation, but nothing else appears on the conversation window, and nothing is logged (I do logging on XML files too, for easier debugging).

How can I detect if the user cannot open/use activities?

[1905 byte] By [DiegoMu?oz] at [2008-3-3]
# 1
More info after some tests:
  • With very old clients (Windows Messenger included in Windows XP) the function is called properly.
  • With MSN Web Messenger, PocketPC/Windows Mobile 6.0 Live Messenger and the WLAs SDK's Query Window, the procedure is not called.
Maybe it just looks at the MSNP version? There ins't any way of checking if the client supports activities?
Kartones at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Windows Live Agents Development...
# 2
You will want to determine that the user can open Activity Windows *and* the user is not on mobile. You will do the folloowing check and then call the MSNSLPUserCanNotOpenP4Window proc.

if (CLIENTID & 512) != 0 || (CLIENTID & 1) != 0 || (CLIENTID & 4026531840) < 1073741824

call MSNSLPUserCanNotOpenP4Window()

DEFINITIONS:

(CLIENTID & 512) != 0 -- checks if the user is on the web

(CLIENTID & 1) != 0 -- checks if the user is on mobile

(CLIENTID & 4026531840) < 1073741824 -- checks if the user is on an old version of Messenger

BrittCoop-MSFT at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Windows Live Agents Development...
# 3
Many thanks Brit, I've tested it and now works perfectly!

Regards,

Kartones at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Windows Live Agents Development...

Windows Live Developer Forums

Site Classified