Problem with event

Hi everybody,

I am quite new to Activity SDK and I am trying to develop a project in which I need to get a message from the conversation window in my Activity.

To do this I am using the event OnImReceived, as explaned on the documentation, but it doesn't seem to work.

I post here an example to explain better:

function Channel_OnDataReceived() {
myIM = Channel.IM;
alert(myIM);
}

In this example, once I get the message from the user, I just create an alert window to show it in my application.
To get the event, I use this function, that is supposed to implement the event.
Should I implement the event in a different way

Another thing that I can't really understand is why this event is perfectly identical to the event OnDataReceived. Is this an error in the documentation

Thank you for any help.

AB


Answer this question

Problem with event

  • Ric Bevan

    The activity API has 2 different 'data sources'. The 'activity Channel', and the Chat window. The channel is used to send data from activity to activity, the user(s) won't be able to see this data. For example, this channel will be used to send information about a player's position in a game. You can send data over the channel by using Channel.SendData. On the other side, Channel_OnDataReceived will be triggered, and the sent data will be accessible via Channel.Data.

    The conversation window instant messaging text has nothing to do with this actually. To interact with the IM stream, you'll first need to set the ReceiveIM in your msgrp2p.xml file to true. You'll probably need to get your activity certified when you ship your final application. When your contact now receives an IM, Channel_OnIMReceived will be triggered, and the IM data will be in Channel.IM.

    I hope you know better understand the difference

    PS. Read more @ http://msdn.microsoft.com/library/default.asp url=/library/en-us/messengerp2p/introduction.asp



  • Problem with event