An activity window? Would you mind telling me more about what an activity window is? What would the user on the other end see? What is the "purpose" of an activity window?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I hate to say this, but I can't make out what's going on in those pictures. (I can't read chinese) However, would you mind explaining a little about what I'm looking at in the picture (http://www.xiaoi.com/help/tv3.jpg)? Where is the "activity" part. Is this something that's in the standard MSN client?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Ralph,
I have almost managed to send an activity message using the following code.
Maybe it would be useful to have this code available inside the library.
Regards,
Javier
public class Activity {
public final static String ActivityTypeGuid = "{6A13AF9C-5308-4F35-923A-67E8DDA40C2F}";
private int baseId;
public int getBaseId() {
return baseId;
}
private int nextBaseId() {
baseId = MsnP2PBaseIdGenerator.getInstance().getNextId();
return baseId;
}
Simple that i want to peer client open an activity window which url is Application-URL.
which message i should use and how ?
Anybody can help me?
An activity window? Would you mind telling me more about what an activity window is? What would the user on the other end see? What is the "purpose" of an activity window?
ActivityTypeGuid = "{6A13AF9C-5308-4F35-923A-67E8DDA40C2F}".
I only want to use it show ourself website in the activity window.
and need to parameters: website url and activity name.
ActivityMessage(String url,String activityName).
so in the activity window i can use Buddyscript SDK(such as jscript,vbscript and so on).
instance example: www.xiaoi.com
example picture url: http://www.xiaoi.com/help/tv3.jpg
I hate to say this, but I can't make out what's going on in those pictures. (I can't read chinese) However, would you mind explaining a little about what I'm looking at in the picture (http://www.xiaoi.com/help/tv3.jpg)? Where is the "activity" part. Is this something that's in the standard MSN client?
http://www.xiaoi.com/help/tv3.jpg the right window is the activity window.
i'm so sorry.
this message likes the file transfer protocal.
what should i do is waiting for filetransfer module completed.
Daniel Henninger (jadestormProject Admin) - 2006-12-21 10:39
Is this something that's in the standard MSN client?
yes.
the protocal cap
http://www.grassox.com/1.JPG
Hi Ralph,
I have almost managed to send an activity message using the following code.
Maybe it would be useful to have this code available inside the library.
Regards,
Javier
public class Activity {
public final static String ActivityTypeGuid = "{6A13AF9C-5308-4F35-923A-67E8DDA40C2F}";
private int baseId;
public int getBaseId() {
return baseId;
}
private int nextBaseId() {
baseId = MsnP2PBaseIdGenerator.getInstance().getNextId();
return baseId;
}
public void send(MsnSwitchboard switchboard, String activityNumber, String activityName,String mailTo, String mailFrom) {
String activityUrl = activityNumber + ";1;" + activityName;
String context;
try {
context=net.sf.jml.util.StringUtils.encodeBase64(activityUrl.getBytes("UTF-16LE"));
} catch (UnsupportedEncodingException e) {
context=net.sf.jml.util.StringUtils.encodeBase64(activityUrl.getBytes());
}
MsnslpRequest msnslpRequest=new MsnslpRequest();
msnslpRequest.setRequestMethod(MsnP2PInvitationMessage.METHOD_INVITE);
msnslpRequest.setRequestURI("MSNMSGR:"+mailTo);
msnslpRequest.setTo("<msnmsgr:"+mailTo+">");
msnslpRequest.setFrom("<msnmsgr:"+ mailFrom +">");
msnslpRequest.setVia("MSNSLP/1.0/TLP ;branch={" + GUID.createRandomGuid() + "}");
msnslpRequest.setCSeq(0);
msnslpRequest.setCallId("{" + GUID.createRandomGuid() + "}");
msnslpRequest.setMaxForwards(0);
msnslpRequest.setContentType("application/x-msnmsgr-sessionreqbody");
StringHolder body = new StringHolder();
body.setProperty("EUF-GUID",ActivityTypeGuid);
body.setProperty("SessionID",NumberUtils.getIntRandom());
body.setProperty("SChannelState",0);
body.setProperty("Capabilities-Flags",1);
body.setProperty("AppID", activityNumber);
body.setProperty("Context", context);
msnslpRequest.setBody(body.toString() + JmlConstants.LINE_SEPARATOR + "\0");
int SlpMessageLength = Charset.encodeAsByteArray(msnslpRequest.toString()).length;
MsnP2PSlpMessage slpMessage = new MsnP2PSlpMessage();
slpMessage.setSlpMessage(msnslpRequest);
slpMessage.setIdentifier(nextBaseId());
slpMessage.setTotalLength(SlpMessageLength);
slpMessage.setCurrentLength(SlpMessageLength);
slpMessage.setField7(NumberUtils.getIntRandom());
slpMessage.setP2PDest(mailTo);
switchboard.sendMessage(slpMessage);
}
}
Where is MsnslpRequest from?
I have seen the MsnslpRequest on the jml. But how to set our own activity so that users can accept and open my own url?
For local testing, you have to create a msgrp2p.xml file and place it in the same folder you have your msn client installed.
For more info about it, you can download the Activity SDK from Microsoft
http://www.microsoft.com/downloads/details.aspx?FamilyID=3656f4de-1db2-4f6c-b278-abb1c5ca5934&displaylang=en
Regards